Commit Graph

3 Commits

Author SHA1 Message Date
Drew T e0eaa16741 feat(phase-30 S45p7): Stage 1 complete — shared-state RW lock + 15 more banks (wave-3 revived)
STAGE 1 of docs/concurrency-design.md, landed and negative-control proven.

tools/shared_lock.py (NEW) — one reader/writer flock over the FLEET-SHARED state
(src/shared/*, config/overlays.mk, config/dedup.us.yaml, the overlay .c files
propagation rewrites). Per-binary resources keep gate_stage's existing per-binary flock.
  - gate_stage takes it SHARED when the gate writes no shared state, EXCLUSIVE when it
    does (propagate, or the arity pre-pass enabled) -- so distinct-binary gates still run
    concurrently but can never overlap a writer.
  - dedup_propagate and fix_arity_callers --apply take it EXCLUSIVE.
  - NESTING-AWARE: gate_stage SPAWNS both writers, so a naive child lock would deadlock
    against the parent. The holder exports BFM_SHARED_LOCK_HELD and children inherit.

NEGATIVE CONTROLS (all pass):
  NC1 a held SHARED lock refuses a non-blocking exclusive writer, loudly, naming the lock
  NC2 parent-holds/child-inherits does NOT deadlock (the real risk in this design)
  NC3 two readers acquire concurrently (0.00s) -- phase-B parallelism preserved

bulk_harvest docstring CORRECTED: its "propagation is the ONLY writer of the shared
engine_core.h" claim was FALSE as written and had been asserted for phases (F1 -- the
arity pre-pass writes it from inside every worker). Now states what is actually true,
under which two conditions, plus the one-line assertion that detects a violation.

BANKS: wave-3's drafts re-gated on a CLEAN tree -> 15 of 20 banked. The same drafts
previously reported 0 banked / 20 near -- that verdict was 100% an artifact of the
broken tree, which is why they were held as UNJUDGED rather than accepted as failures.
check-all 213 passed / 0 failed. F1 bracketing assertion CLEAN.

Session total banked: 44 functions + func_8015C030 propagated x7.
2026-08-07 18:57:10 -06:00
Drew T 35bc7c3873 feat(phase-23): bulk_harvest --cycles campaign mode (resumable, per-cycle commit, dry/STOP-aware) 2026-06-30 23:34:31 -06:00
Drew T c5cca1c6d4 feat(phase-23): T10 tooling — parallel-safe gate spine + bulk_harvest
- gate_stage.run_gate: optional lock_path (per-binary lock), verified_out/failed_out
  (per-worker harvest scratch), compute_fleet toggle — all default to today's behavior,
  so grinder/orchestrator/lora_grind are byte-unaffected
- harvest_verify: --verified-out/--failed-out (per-worker result paths for parallel gating)
- bulk_harvest.py (NEW): phase-separated saturation factory — bulk-draft (GPU) ->
  ProcessPool parallel-gate over distinct binaries (build/<bin>/** isolated) ->
  dedupe-once + one commit; round-robin fuel spread; whole-binary byte-gate stays the
  sole arbiter (G3/P9); on-demand/bounded (STOP sentinel); lora_grind kept as fallback
2026-06-30 22:48:26 -06:00