Skip to content

chore(sync): main into the town branch (reach perf, --stage-anyway, constitution) - #1245

Merged
stellarfeline merged 7 commits into
feat/town-mergefrom
sync/town-main
Nov 1, 2026
Merged

stellarfeline merged 7 commits into
feat/town-mergefrom
sync/town-main

Conversation

@stellarfeline

Copy link
Copy Markdown
Owner

Brings main @ 1f068cd into feat/town-merge before the branch opens its pull request into main.

  • One conflict, in nav/world/reach.rs: World::body_flood takes main's pruned flood verbatim; World::body_route keeps the branch's breadth-first confined_closure, which DW0838 needs to name a fewest-move route. The reach agreement test now asserts the two walks reach the same cells over its 48 generated cases.
  • spec-0127 and spec-0128 set to Accepted, with their criteria checked against the merged tree and the two unmet ones recorded as debts.
  • Re-shown on the merged tree: gallery output byte-identical to the branch tip (1570 files per language, 0 differing; warnings 271 = 271); the town's build output byte-identical across both engines (267 files); cargo test --workspace --no-fail-fast 5201 passed, 0 failed.

🤖 Generated with Claude Code

stellarfeline and others added 7 commits October 28, 2026 21:07
…1239)

## What is wrong

After the reach graph landed, the `rust` CI job went from about 56 minutes to more than 3 hours. A creator's `detail` commit got slower in the same proportion.

## Causes (measured two ways: per-call-site counters, and macOS `sample`)

1. `graph_memo` checked its map, released the lock, built, then inserted. Every parallel thread that met a new world built its own graph: 430 builds for 52 distinct worlds, and lineage reuse was lost.
2. `body_flood` flew all nine launch quadrants of every node it reached, instead of following the envelope the way `body_reach` does.
3. The trapped-cell loop fully flew every node that read as trapped.
4. DW1011's `escape` ran a cheapest-path search with every quadrant per gate, side and configuration.

## Fixes

- `graph_memo` holds a per-digest `OnceLock`, so one thread builds each world's graph and the others wait for it. Graph builds: 430 → 52.
- `body_flood` closes the way `body_reach_at` does.
- `World::fly_toward` flies one direction at a time in `cells_a_body_cannot_leave`. The trapped set is the same.
- DW1011 tries the confined flood first, and `escape` runs, unchanged, only where that flood meets the far face or the open sea.

Node expansions per site-plan commit fell from 20,312 to 10,919; memo walks from 87.7M to 32.6M.

## Measurements

- Release `detail` commit on the gallery's site-plan point: 182 → 80 CPU-seconds (2.2× less).
- `cargo test --workspace --no-fail-fast`, 16 threads, base and head back to back: 22,095 → 14,724 CPU-seconds (−33%), with 376 of 376 binaries passing.
- The binding-line diff over 95 gallery lines is empty. `gallery-baseline` shows 0 of 10,492 emitted paths changed. Four gallery builds were byte-identical.

## What remains

The CI rust job is estimated at about 1.9 hours, against the target of about an hour. Around 10.9k expansions are distinct worlds and nodes, and most of the remaining time is memory-latency-bound memo walks. Cutting that further needs a different memo layout or fewer worlds per build. That is a follow-up round.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
…, gallery element and demo level are owed at merge

docs(constitution): a direction is explored and looked at first; spec, gallery element and demo level are owed at merge

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
## What changes

`--stage-anyway "<reason>"` now overrides every refusal the staging gate makes, with no exclusion list. That covers:

- ledger reds;
- a missing or red critical-path proof;
- a missing or red written-world proof;
- the stand-in refusal;
- the test-level mismatch;
- the resource-pack statement.

Each overridden refusal prints as an `OVERRODE` line, is appended to the report, and is stored in the admission token. The server echoes the overrides at boot. `--acknowledge-red` becomes optional.

Without `--stage-anyway`, every refusal still refuses. A build with no `manifest.json` still refuses, because there is no identity to bind a token to.

## Proof

- `tools/tests/test_staging_gate.py` and the playtest-server tests pass, 196 in total.
- `playtest-server.sh up gallery --stage-anyway` reached READY with three overrides listed. The same build without the flag was refused.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
…, --stage-anyway)

Brings origin/main @ 1f068cd into feat/town-merge @ d06b9e5.

What main claims (three commits the town branch lacked):
- 0ef8230 perf(reach) (#1239): one reach graph memo per world, and
  World::body_flood flies only the launches the envelope says can add a
  cell; its set is still the closure of World::body_edges under the
  confinement, output byte-identical, gallery binding diff empty.
- 73e6334 docs(constitution): a direction is explored and looked at
  first; spec, gallery element and demo level are owed at merge.
- 1f068cd fix(staging): --stage-anyway overrides every refusal of the
  staging gate and names each one.

What the town branch claims on this file: World::body_route names a leak's
route (DW0838) as the fewest moves of the reach graph, ties in cell order,
over exactly the moves body_flood's closure holds (spec-0127 "each leak
names its route"); the town branch did it by routing body_flood and
body_route through one breadth-first confined_closure over body_edges.

The conflict, crates/delvec/src/compiler/nav/world/reach.rs: main rewrote
body_flood's body (envelope-pruned launches); the town branch had replaced
the same body with a call to confined_closure. Resolution: body_flood takes
main's body verbatim (its pruning, and the speed #1239 measured, kept for
every flood); body_route keeps the town branch's breadth-first
confined_closure over every edge of body_edges, byte-identical to the town
tip's, because main's pruned walk skips launches that cannot add a cell
and so cannot promise a fewest-move route. The two walks are held to one
set by a new assertion in reach::agreement (next commit). confined_closure
and body_route's doc comments say which walk is which.

Auto-merged without conflict: docs/reference/delvec/compiler/nav.md (main's
body_flood paragraph and the town branch's edits touch different lines) and
docs/reference/tools.md (main's staging-gate row, the town branch's
detail/grammar rows).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019qiQFhKtTpTbYnn9NZBbSd
World::body_route walks every edge of body_edges breadth-first to name a
fewest-move route; World::body_flood skips launches the envelope says
cannot add a cell. The agreement test now asks the route's walk, run to
the end, the same generated parkour cases and asserts it equals DW0838's
flood. blockout.md's DW0838 row says which walk the route is named over.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019qiQFhKtTpTbYnn9NZBbSd
Both specs' Status is Accepted. Every criterion was re-checked against the
town branch with main @ 1f068cd merged in: every test a criterion names
exists in the merged tree (49 names across the two specs, 0 missing).

Debts paid since the specs were written, each now naming its test:
- spec-0127 criterion 2: the crown clearance over a slope,
  a_crown_stands_three_or_more_over_every_column_it_covers_on_a_slope;
- spec-0127 criterion 5: open -> absent perturbation,
  an_undeclared_side_owes_no_clear_width_and_has_no_front (open sides
  5 -> 4, threshold shots 26 -> 25);
- spec-0127 criterion 6: dw1064_admits_a_stair_across_a_side_declared_open.

Debts that stand: spec-0127 criterion 3 (no test of Site::fixed_top on an
open side) and spec-0128 criterion 22 (the --at node/<place> camera is
passed but not asserted). spec-0128 criterion 13's test count is the
tree's, 48.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019qiQFhKtTpTbYnn9NZBbSd
check-numbered-doc-index refused the index rows that still read Proposed.

Correction to the previous commit's body: the criteria of the two specs
name 64 tests, not 49; all 64 exist in the merged tree (the two
holders.json keys criterion 8 of spec-0127 says are absent are absent).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019qiQFhKtTpTbYnn9NZBbSd
@stellarfeline
stellarfeline merged commit 51c0d67 into feat/town-merge Nov 1, 2026
1 check passed
@stellarfeline
stellarfeline deleted the sync/town-main branch November 1, 2026 06:11
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