Skip to content

sync: declmig-interfaces: sync/main-local-20260911 - #15

Merged
ORESoftware merged 1 commit into
mainfrom
sync/main-local-20260911
Sep 11, 2026
Merged

ORESoftware merged 1 commit into
mainfrom
sync/main-local-20260911

Conversation

@ORESoftware

Copy link
Copy Markdown
Contributor

Fleet sync 20260911 from the citadel Mac (~/codes/declarative-migrations/declmig-interfaces).

Branch sync/main-local-20260911 carries 1 commit(s) not on main; 22 files changed, 2189 insertions(+)

Files:

  • .gitattributes
  • .githooks/post-checkout
  • .githooks/post-merge
  • .githooks/pre-commit
  • .githooks/pre-commit-generated
  • .github/workflows/generated-contract.yml
  • generated/README.md
  • runtime/dart/contract_guard.dart
  • runtime/rust/contract_guard.rs
  • runtime/typescript/contract-guard.ts
  • scripts/check-generated-contract.py
  • scripts/seed-contract-fixtures.py
  • tests/generated-contract/invalid/migrationplan.empty-id.json
  • tests/generated-contract/invalid/migrationplan.empty-revision.json
  • tests/generated-contract/invalid/migrationplan.missing-required-id.json
  • tests/generated-contract/invalid/migrationplan.missing-required-payload.json
  • tests/generated-contract/invalid/migrationplan.missing-required-revision.json
  • tests/generated-contract/invalid/migrationplan.unknown-field.json
  • tests/generated-contract/invalid/migrationplan.wrong-type-id.json
  • tests/generated-contract/invalid/migrationplan.wrong-type-payload.json
  • tests/generated-contract/invalid/migrationplan.wrong-type-revision.json
  • tests/generated-contract/valid/migrationplan.json

Rules followed: no rebase, no stash, no reset, no force-push; conflicts (if any) are resolved semantically per oresoftware/my-ai/AGENTS.md before this is marked ready.

🤖 Generated with Claude Code

https://claude.ai/code/session_01G7RjB22qc4AaKq4zqeVBVY

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
@ORESoftware
ORESoftware merged commit 1282c03 into main Sep 11, 2026
2 of 3 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