story: fix autogeneration issues in relation to AI #203
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?
Symptom
Today on herodemo, the Contexts island showed "Root × 5" — every per-context query was silently falling back to the root context. The fix for this exact bug shipped months ago as
hero_osis@7807258(issue #41, MOCK_CONTEXTS expansion inhero_osis.rs).Why is it back? Because
crates/hero_osis_server/src/bin/hero_osis.rsis now auto-generated bybuild.rs(per-domain single-binary refactor). The file's own header literally says:The codegen template did not include #41's expansion. So the next regeneration silently dropped the fix. Filed properly as lhumina_code/hero_osis#42.
The pattern
This is not unique to hero_osis. We have several auto-generated files across the workspace, and any time someone hand-applied a fix to one before it was added to the generator, the fix is a time bomb against the next regeneration.
Proposal
A one-time audit + ongoing rule:
Audit (one-time)
Find every file across the workspace that contains a "DO NOT EDIT" / "auto-generated" header. For each:
git log -pon the file → identify any commit that wasn't a regeneration (i.e. a commit that hand-edited the file).Candidate files to audit (non-exhaustive):
hero_osis/crates/hero_osis_server/src/bin/hero_osis.rs— known case (#42).hero_osis_sdk/(auto-generated from OpenRPC).// DO NOT EDITheader —grep -rn 'DO NOT EDIT' crates/ archipelagos/ bin/will find them.Ongoing rule
Document in CLAUDE.md:
A linter check would be even better: a CI step that detects when an auto-generated file has been modified without a corresponding change in its generator. Future enhancement.
Acceptance
Cross-references
Signed-off-by: mik-tf
[infra] Audit auto-generated files for stranded manual fixes (codegen drift)to story: fix autogeneration issues in relation to AI