Skip to content

rescue(citadel-20260904): rescue/wip-main-citadel-20260904 from citadels-macbook-pro-local - #4

Merged
ORESoftware merged 2 commits into
mainfrom
rescue/wip-main-citadel-20260904
Sep 12, 2026
Merged

ORESoftware merged 2 commits into
mainfrom
rescue/wip-main-citadel-20260904

Conversation

@ORESoftware

Copy link
Copy Markdown
Contributor

Automated rescue of local-only work found on citadels-macbook-pro-local (sweep citadel-20260904). Source branch: rescue/wip-main-citadel-20260904 @ 6600788. Review, cherry-pick what is still wanted, then close.

ORESoftware and others added 2 commits August 28, 2026 20:21
Generated files were hand-editable and nothing in the tree said they should
not be. This adds the policy, the local guard, and the check that actually
enforces it.

Each generated/ directory gets a README declaring one of three policies, and
the checker refuses to take that declaration on trust:

  frozen    committed and machine-owned. Files must be tracked; chmod a-w on
            disk. A tree claiming this with nothing tracked is an error.
  writable  scaffolded once, now maintained by hand. Never chmod-ed.
  ignored   build output, deliberately absent from VCS. The files must really
            be gitignored; still chmod a-w so a stray edit fails locally.

Three layers, in increasing order of authority:

  chmod a-w     your editor refuses the write. Local ergonomics only. Git
                stores just the executable bit, so a clone comes back at mode
                644 and the bit is gone; post-checkout and post-merge re-apply
                it.
  pre-commit    refuses a commit touching a frozen file. Bypassable with
                REGEN=1, which is the point: regenerating is legal, hand
                editing is not.
  CI            scripts/check-generated-contract.py verifies the README
                against what git actually does, that every frozen file is
                read-only, and that JSON Schema still accepts the valid
                fixtures and rejects the invalid ones. Plus regenerate-and-
                diff where the repo declares how. This is the layer that
                enforces the policy.

On JSON Schema: it is a cross-check, not the codegen input. The generated
types come from the primary IR (route map, .cli-flags.toml); the schema is an
independently derived description of the same contract, so disagreement means
one of them has drifted.

.gitattributes marks these trees linguist-generated to collapse PR diffs. No
merge driver is set on purpose: merge=ours would resolve conflicts by picking
a side, which is not how conflicts get resolved here.

Enable the hooks once per clone:

    git config core.hooksPath .githooks

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AWgrvzGvJHfx7edBfbrgPG
…adels-macbook-pro-local (/sessions/rcw-01uvb83whqsjgbiyuwkbyiid/mnt/codes/zed-pkg-test/awkward-lib)
@ORESoftware
ORESoftware merged commit 5b175e7 into main Sep 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant