iter architect-iron-law.2: extend ailang-architect with sweep-script invocation + lockstep-checklist for two known cross-file pairings
This commit is contained in:
@@ -70,6 +70,27 @@ If `milestone_scope` is empty, return a structural error and stop.
|
||||
- **JOURNAL truthfulness.** Does the most recent JOURNAL entry match the
|
||||
diff, or is it optimistic? An over-claiming JOURNAL is its own kind of
|
||||
drift.
|
||||
- **DESIGN.md history-anchor regrowth.** Run
|
||||
`bash bench/architect_sweeps.sh` from the repo root. Exit 0 = clean.
|
||||
Exit 1 = at least one of the four sweeps from the
|
||||
design-md-consolidation milestone (2026-05-10) matched. Review each
|
||||
match: a legitimate quote (e.g. a JOURNAL citation inside a block-
|
||||
quote) is fine; a fresh history anchor / REVERTED narrative /
|
||||
workflow detail / stale cross-reference is drift to flag.
|
||||
- **Lockstep invariants across files.** Two known cross-file pairings
|
||||
must move together; a new arm in one without the matching update in
|
||||
the other ships silently broken (B1 in the Floats fieldtest is the
|
||||
canonical example). On every milestone-close, walk these pairs:
|
||||
|
||||
| Pair | Failure mode |
|
||||
|---|---|
|
||||
| `Pattern::Lit::*` typecheck rejects in `crates/ailang-check/src/lib.rs` ↔ pre-desugar walkers in `crates/ailang-check/src/pre_desugar_validation.rs` | A reject arm placed AFTER `desugar_module` in the call chain is unreachable through the public `check` API if the desugar pass rewrites that pattern shape first (e.g. `desugar::build_eq` rewrites `Pattern::Lit::Float` into `(== scrut lit)` before typecheck runs). New rejects on a `Pattern::Lit::*` shape MUST live in `pre_desugar_validation.rs`, or be paired with a written guarantee that no desugar pass eats the shape. |
|
||||
| `lower_app` arms in `crates/ailang-codegen/src/lib.rs::lower_app` (line ~1749) ↔ name recognition in `crates/ailang-codegen/src/lib.rs::is_static_callee` (line ~2189) | A name lowered by a direct `lower_app` arm but unrecognised by `is_static_callee` falls through to the indirect-call path with `UnknownVar` (`UnknownVar` panic in worst case). Every new builtin lowering arm in `lower_app` must have a matching `is_static_callee` entry. |
|
||||
|
||||
Walk procedure: for each milestone-scope commit-range arm landed in
|
||||
these files (use `git diff <prev-close>..HEAD --` on each file in
|
||||
the pair), open both files in the pair and confirm the matching
|
||||
update is present. Flag any unpaired arm as drift.
|
||||
|
||||
## The Iron Law
|
||||
|
||||
@@ -89,6 +110,10 @@ to fix one).
|
||||
tail → spec (if any) → recent diff.
|
||||
2. `git log --oneline -30` and `git diff <prev-milestone-close>..HEAD` for
|
||||
the factual diff.
|
||||
2.5. Run `bash bench/architect_sweeps.sh` from the repo root. If exit
|
||||
code is 1, treat each matched line as a drift-suspicion to verify.
|
||||
If exit code is 2, the script could not find DESIGN.md — fix the
|
||||
working directory and re-run before continuing.
|
||||
3. Read every changed file. Read the unchanged-but-load-bearing
|
||||
neighbours (e.g. if codegen changed, also re-skim `runtime/rc.c`).
|
||||
4. For each suspicion, anchor it to a path + a short justification why it
|
||||
|
||||
Reference in New Issue
Block a user