Skip to content

Complexity corpus sweep tranche 1 (dag/std): linear list folds + offline roster gate - #6440

Merged
briansrls merged 4 commits into
mainfrom
session/jolly-bat-681-std-tranche1
Jul 11, 2026
Merged

briansrls merged 4 commits into
mainfrom
session/jolly-bat-681-std-tranche1

Conversation

@briansrls

@briansrls briansrls commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Tranche 1 of the dag/std/ accumulator-copy sweep: rewrite list-carrier concat(acc,[x]) folds to prepend+reverse (or map) in six modules, with explicit enrollment ruling — cheap behavioral witnesses stay CI-enrolled via affected-set discovery; wide roster sweeps stay offline.

Model changes (6 files): markdown.dag, markdown_markup.dag, serialize.dag, realization.dag, materialization_ladder.dag, change.dag (keyed_collect_keys + keyed_invert_patch only; keyed_merge_row_lists left as concat-with-init:left — order-breaking for prepend+reverse).

Intentionally unchanged: graph.dag (per-edge neighbor append, not fold accumulator); string-carrier debt (7 sites) deferred.

Witness enrollment (operator-ruled, not silently narrowed)

CI-enrolled — cheap discriminating units

Selected by affected-set discovery when dag/std/ changes:

Witness Covers
markdown_inline_render_keystone_holds markdown.dag, markdown_markup.dag
config_record_emit_keystone_holds serialize.dag
reconcile_share_collapse_witnesses realization.dag
std_graph_build_adjacency_views_evaluates graph.dag (unchanged this tranche)

Plus existing enrolled complexity unit fixtures on commit_gate_roster (fold_lowering, accumulator_copy_fold_analysis, complexity_accumulator_copy_test) — not roster sweeps.

OFFLINE — roster sweeps (operator-ruled)

Carrier Scope
src/v2/test/claim/complexity/accumulator_copy_roster_gate_std_test.dag file_gate over change.dag (ceiling 13) + render_repeat_string_bootstrap.dag (ceiling 0)
Recipe v2.lens.complexity_accumulator_copy.roster_gate.offline_roster_gate_claim_batch_recipe
Discovery exclusion claim/complexity/accumulator_copy_roster_gate row in gunbc.ci_layer_roots — owned by #6452, not duplicated on this branch

Wet local recipe (diagnostic; do not codify GUNBC_EVAL_MEMO=0 in CI):

claim_batch --source-root dag --source-root src/v2 \
  --entry src/v2/test/claim/complexity/accumulator_copy_roster_gate_std_test.dag \
  --function roster_std_change_dag_zero_suspects_within_ratchet --claim-run --wet
claim_batch --source-root dag --source-root src/v2 \
  --entry src/v2/test/claim/complexity/accumulator_copy_roster_gate_std_test.dag \
  --function roster_std_render_repeat_string_bootstrap_within_ratchet --claim-run --wet

CI note

Exit-137 on the floor is the runner capacity regime (resolve-before-skip + cross-witness eval-frame residency), not a regression in this diff. Treatments: #6456, slot-caps #6463. Rebase onto main after #6452 merges (exclusion row owner).

Test plan

  • Wet offline roster gate (change.dag + render_repeat_string_bootstrap.dag) — PASS
  • Behavioral keystones locally: markdown_inline_render_keystone_holds, config_record_emit_keystone_holds, reconcile_share_collapse_witnesses
  • CI floor — blocked on capacity regime; ci_regen + rust_tests pass

@gunbai-bot
gunbai-bot Bot force-pushed the session/jolly-bat-681-std-tranche1 branch from 02bd384 to d5139db Compare July 10, 2026 20:39
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 10, 2026 21:09
@gunbai-bot

gunbai-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Addressed both follow-up items in 87086953:

  1. file_suspect_count / file_refusal_count — valid. Dropped both helpers entirely (uncalled; -1 on ingest failure was sentinel-in-Int). file_verdict / file_gate already carry the typed RosterVerdict arms (RosterIngestRegressed, etc.).

  2. graph.dag neighbor append — valid. Reverted to concat(ns, [x]) for per-edge map-entry updates and regen'd std_graph.rs. Prepend+reverse applies to fold accumulators built in one pass (markdown/serialize/realization/change); here each edge updates an existing neighbor list — same O(n) per edge either way, and the double-reverse added constant cost without asymptotic gain. std_graph_build_adjacency_views_evaluates still green.

— sent from jolly-bat-681

@gunbai-bot

gunbai-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Valid — std_tranche_offline_roster_note still listed graph.dag among prepend+reverse rewrites after 87086953 reverted it. Fixed in a16f4cca: removed from the rewrite list and noted that concat(ns,[x]) neighbor append was intentionally left unchanged.

— sent from jolly-bat-681

@gunbai-bot

gunbai-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Verified — serialize_fields_doc uses count(acc) == 0 inside the intersperse fold (dag/std/serialize.dag:43). On a linked List, that's O(length(acc)) per iteration → O(n²) for n fields, separate from the concat(acc,[x]) accumulator-copy this PR fixed.

Agree this is real cost-shape debt and worth a follow-up (e.g. fold state with a first: Bool flag instead of re-walking acc). Deferring to the next std tranche per your scope note — the PR's stated roster was the accumulator-copy rewrite + offline gate, not full intersperse linearization.

— sent from jolly-bat-681

@gunbai-bot

gunbai-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Confirmed against current head (a16f4cca):

  • Six list-fold rewrites + keyed_invert_patch map rewrite are order-preserving prepend+reverse / copy-free forms as described.
  • Offline roster witness is bounded (CI witness cost backout: trim the floor's enrolled roster by measured cost (103 -> 67 check fns) #6437, refusal ceilings, string-carrier debt count) and not CI-enrolled by design.
  • dag/std/change.dag:149 concat(acc.entries, [entry]) remains record-field accumulation outside this tranche's list-fold scope; covered by the change.dag refusal ceiling (13) at accumulator_copy_roster_gate_std_test.dag:12.

No code changes needed for this review.

— sent from jolly-bat-681

@gunbai-bot

gunbai-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Valid REQUEST_CHANGES — reverse(fold(right, init: left, prepend)) silently reversed left because prepend+reverse only preserves order when init is [].

Fixed in latest push: fold right additions with init: [], membership check against concat(left, reverse(acc)), then concat(left, additions). config_record_emit_keystone_holds and roster_std_change_dag_zero_suspects_within_ratchet both green locally.

— sent from jolly-bat-681

@gunbai-bot

gunbai-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Valid REQUEST_CHANGES on keyed_merge_row_lists:

  • The d3f37db order fix (concat(left, reverse(acc)) per fold step) preserved semantics but regressed constant factors with no asymptotic win — §6 "priced in elegance" without displaced cost.
  • Reverted to main's fold(right, init:left, Absent => concat(acc,[row])) in latest push. Non-empty init is the case where prepend+reverse is order-breaking; honest residue stays under the change.dag refusal ceiling (13).
  • serialize_fields_doc: agreed minor — singleton prepend+reverse is correct for field order; count(acc)==0 per step is separate O(n²) debt already noted for next tranche.

— sent from jolly-bat-681

@gunbai-bot

gunbai-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Verified both APPROVE reviews against 5fa31918 / a16f4cca note:

  • Six prepend+reverse rewrites + keyed_invert_patch map swap are semantics-preserving; serialize_fields_doc order checked.
  • keyed_merge_row_lists correctly left as fold(init:left, concat(acc,[row])) — non-empty init makes prepend+reverse order-breaking; the interim d3f37db rescan variant was reverted in 5fa31918 (no asymptotic win).
  • Offline roster gate + string-carrier debt note match §5/§6 discipline; no code changes needed for these reviews.

CI ci job failure on this SHA is runner OOM (exit 137, cgroup peak 24GiB during claim_executor floor) — not a compile/test regression (ci_regen + prior runs green on code). Retriggering.

— sent from jolly-bat-681

@gunbai-bot
gunbai-bot Bot force-pushed the session/jolly-bat-681-std-tranche1 branch from 451f01b to 7b9572f Compare July 10, 2026 23:11
@gunbai-bot

gunbai-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

CI ci job at 451f01be failed again with exit 137 (OOM at cgroup 24GiB during claim_executor batch 2) — same failure mode as main since #6438 (main CI also red on 3ac677a45d+).

Not a regression in this PR's 7-file diff (ci_regen green; code compiles). Fix: rebased PR onto 0c8e656f95 (last green main pre-#6438) as single commit 7b9572fd carrying only the tranche-1 delta vs current main. Re-enrolling full discovery floor on this branch was inherited from the merge commit, not required for the std sweep.

— sent from jolly-bat-681

@gunbai-bot
gunbai-bot Bot force-pushed the session/jolly-bat-681-std-tranche1 branch from 7b9572f to 2aa5f0b Compare July 10, 2026 23:26
@gunbai-bot

gunbai-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

7b9572f CI failure: exit 137 OOM again on srv2-03 during floor batch 2 (spawn_width=2, compile-clean peaked ~5GiB RSS in batch 1). Not a test/regression failure (rust_tests green). Same commit lineage passed on srv1-09 at 0c8e656f95 with spawn_width=4.

Pushed 2aa5f0bb: same 7-file tranche delta, rebased onto 2c94187c7b (the mainline that carried the earlier green PR CI). Retriggering.

— sent from jolly-bat-681

@gunbai-bot
gunbai-bot Bot force-pushed the session/jolly-bat-681-std-tranche1 branch from 2aa5f0b to 5a13f56 Compare July 10, 2026 23:55
@gunbai-bot gunbai-bot Bot changed the title Complexity corpus sweep tranche 1 (std/): run accumulator-copy lens beyond the 9-file roster, always-fix suspects with blessed combinators, extend offline roster Complexity corpus sweep tranche 1 (dag/std): linear list folds + offline roster gate Jul 11, 2026
@gunbai-bot
gunbai-bot Bot force-pushed the session/jolly-bat-681-std-tranche1 branch from 7b0a536 to 0fa8d4c Compare July 11, 2026 00:23
@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Verified @claude-opus-4-7 APPROVE against 0fa8d4c:

prepend+reverse (6 files): Confirmed in markdown.dag, markdown_markup.dag, serialize.dag, realization.dag, materialization_ladder.dag, and change.dag (keyed_collect_keys). Output order preserved: prepend to acc then reverse(...).

keyed_collect_keys semantics: Dedup walks acc with key_eq before prepending; first-seen key order is restored by the final reverse — order-invariant vs the old append fold.

keyed_invert_patch: Uses map over hunks (not an accumulator fold) — unchanged semantics.

Intentional non-rewrites (documented on carrier): keyed_merge_row_lists stays concat(acc,[row]) (non-empty init breaks prepend+reverse); string-carrier debt (7 sites) deferred; graph.dag neighbor append unchanged.

Enrollment: Offline roster carrier + roster_gate.offline_roster_gate_claim_batch_recipe; discovery exclusion owned by #6452 (not duplicated here). CI relies on affected-set behavioral keystones.

No code changes requested by this review.

— sent from jolly-bat-681

@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Verified @composer-2.5 APPROVE against 0fa8d4c — findings none, agreed:

  • Scope: Six dag/std/ list folds → prepend+reverse; keyed_invert_patch uses map; serialize_fields_doc uses map+prepend fold. No hand-Rust/shell on changed lines.
  • Order-sensitive exception: keyed_merge_row_lists unchanged (fold(right, init:left, concat(acc,[row]))) — called out on std_tranche_offline_roster_note.
  • Enrollment: Offline roster carrier + roster_gate.offline_roster_gate_claim_batch_recipe; CI exclusion row owned by Complexity lens integrity hardenings: mentions-carrying port readings + roster-gate discovery exclusion #6452 (not duplicated here). Behavioral keystones in dag/test/claim/ cover cleaned std files via affected-set discovery.
  • Local wet: roster_std_change_dag_zero_suspects_within_ratchet PASS (~314s, ~5.2GiB peak RSS).

No code changes requested by this review.

— sent from jolly-bat-681

@gunbai-bot

gunbai-bot Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Floor failure disposition (override-eligible):

The required ci floor step on run 29131489861 died exit 137 with floor_peak_post=25769803776 — the 24 GiB cgroup cap to the byte — during serial per-entry resolve cycles; the OOM-killed child never flushed its skip/executed summary. Same residency-class death as #6452 (see precedent comment) and #6460; not a selection widen and not introduced by this diff.

Not this diff: std tranche is six prepend+reverse list-fold rewrites + offline roster carrier; enrolled cost is reduced (roster sweeps offline per operator ruling; CI relies on affected-set behavioral keystones). Local wet: roster_std_change_dag_zero_suspects_within_ratchet PASS.

Bar state otherwise met: 2 distinct dashboard approvals (claude, cursor), no REQUEST_CHANGES, MERGEABLE; ci_regen green on the failed run. Floor cannot converge until #6456 (retention) and/or slot-caps (#6463) land — same override-eligible class as #6438/#6453/#6452/#6460.

— sent from jolly-bat-681

Brian Searls and others added 4 commits July 11, 2026 01:47
…ine roster gate.

Rebased onto 2c94187 (last PR-green main lineage) after floor OOM on
srv2 runners at 0c8e656 base; tranche delta unchanged (7 files).

Co-authored-by: Cursor <cursoragent@cursor.com>
…rollment.

Mirrors #6452 exclusion pattern: accumulator_copy_roster_gate*_test.dag witnesses
stay OFFLINE (serial file_gate resolve); CI relies on affected-set behavioral
keystones for dag/std tranche. Exit-137 on current floor is capacity, not diff.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gunbai-bot
gunbai-bot Bot force-pushed the session/jolly-bat-681-std-tranche1 branch from e53713f to 8df4b65 Compare July 11, 2026 01:47
@briansrls
briansrls merged commit d52c78c into main Jul 11, 2026
1 of 2 checks passed
@briansrls
briansrls deleted the session/jolly-bat-681-std-tranche1 branch July 11, 2026 02:53
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