Add resource_id to all daw_error/v1 sites in daw-lua-common (en + de) #48
Labels
No labels
coordination/cross-repo
coordination/needed
effort
large
effort
medium
effort
small
meta/duplicate
meta/planning
meta/wontfix
priority
high
priority
low
priority
medium
session
blocker
session
handover
session
next
status
blocked
status
done
status
in-progress
status
review
status
to-go
type
admin
type
bug
type
config
type
deployment
type
docs
type
enhancement
type
feature
type
handover
type
infrastructure
type
installation
type
maintenance
type
migration
type
research
type
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DAW/daw-lua-common#48
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Add resource_id to all daw_error/v1 construction sites in
daw-lua-common (171 sites across 37 files), linking each to a
canonical English daw_i18n/v1 resource, with a German translation.
Background
The daw_error/v1 constructor (daw/common/error/init.lua) already
accepts an optional opts.resource_id (see DAW/daw-lua-common#46).
This issue is the follow-up: actually populating resource_id at
every site that constructs a daw_error/v1 object in this library, not
just having the capability to pass it through.
Blocked by
DAW/daw-lua-common#47 (decide daw_i18n/v1 resource file location for
daw-lua-common) -- resource_id values cannot be assigned to error
sites before the canonical English resource file's location and
shape are decided.
Scope
migration (base64.lua first as reference)
a daw_i18n/v1 resource; message becomes that resource's canonical
English text (see daw_error/v1 specification.md: message MUST be
the canonical text if resource_id is present)
slightly but should be added in the same pass where practical
Acceptance criteria
resource_id used, every placeholder declared)
(partial acceptable per contract, but aim for full coverage)
this only adds resource_id + the canonical resource backing it
Related
DAW/daw-lua-common#46 (resource_id constructor support)
DAW/daw-contracts daw_i18n/v1, daw_error/v1
Migration rule: context on all new canonical error resources
Decided: every newly created canonical daw_i18n/v1 error resource in
this migration gets a context field -- not only resources that happen
to share identical text with another resource.
Rationale: context is cheap to write while the semantic origin is
still in front of us during migration, and retrofitting it later
would invalidate source_hash for everything already migrated anyway.
Setting it consistently now avoids a second pass.
michael referenced this issue2026-08-14 20:33:32 +02:00
Done. All 171+ daw_error/v1 construction sites across all 29 files in daw-lua-common now carry a resource_id, including bootstrap and daw-error-facility-unavailable sentinel paths (extended beyond the original scope per today's decision). Canonical en.json/de.json cover 238 resources, all source_hash values verified against the DAW/daw-contracts#6 algorithm. fragjan-clean, 503/503 tests passing on both Lua 5.1 and 5.4.
Spun off along the way: DAW/daw-lua-common#53 through #58 (structural fail() fallback gap, run_rc()/run() cause-vs-output audits, decimal.is_decimal() integrality, fs.query exists()/is_dir() error swallowing, sys close() exit status), DAW/daw-contracts#6/#7/#8 (source_hash algorithm, distinct-context recommendation, parameter-to-data mapping), DAW/daw-modul-berhtjan-core#13 (host text override, design open).