Skip to content

feat(simulate): flow model B5 Content Factory v2 (stacked on #5559) - #5584

Closed
noahgift wants to merge 27 commits into
mainfrom
batch/b5-content-factory-on-5559
Closed

noahgift wants to merge 27 commits into
mainfrom
batch/b5-content-factory-on-5559

Conversation

@noahgift

Copy link
Copy Markdown
Contributor

STACKED on #5559 (head 0ecee41): this branch is #5559's head plus two cherry-picked commits (2985833, 9469789: flow model B5, Content Factory v2) and a derived-file regen. Do not arm until #5559 has merged; after that the diff against main is only the B5 commits.

Refs #5557 #5545

🤖 Generated with Claude Code

noahgift and others added 25 commits October 18, 2026 12:27
…SIM-2/3, Refs #5511)

Agent: aprender-w5404

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…erge queue, ledger inputs, sim block (Refs #5511)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…w/repo-flow/course-flow (Refs #5511)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…-pr/--r-mq/--sha inputs (Refs #5511)

keep-open: #5511
ont-delta: none
Agent: aprender-w5404 (claude-sonnet-5-5)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ilds --f --n); sim block gets optimum (Refs #5511)

keep-open: #5511
ont-delta: none
Agent: aprender-w5404 (claude-sonnet-5-5)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…-input overrides (Refs #5511)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…easured inputs and sets drift_pct_24h (Refs #5511)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tle's law, same bytes); pin pr-flow in the surface gate (Refs #5511)

Mutant r_mq 4->1 on design D reads 7.36 vs 20.08 and the test goes red; reverted.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…tual, one_change, optimum), one adapter, test first (Refs #5511)

Params shape is provisional until infra pins arbiter-sim-params-v1; only parse_params knows it.
p_dirty and t_rebase are accepted and reported as unmodelled until SIM-6.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ithin 0.5% (RED; flow model B6, Refs #5545)

Agent: aprender-w5032
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…o utilisation thresholds (flow model eq 2,3,5,6) (Refs #5511)

Mutation: min_by -> max_by turns 3 binding tests RED; restored GREEN.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…d reports its mean (flow model B6, Refs #5545)

batch_in_wip (opt-in; reference bands unchanged), mean_batch_wait_h in the result and sim block.
Mutation: dropping the batch-time slot release turns littles_law_holds_with_batch_wait_inside_wip RED.
Also pins the pr/repo/course-flow subcommands in the clap reachability table (12).

Agent: aprender-w5032
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…n batch gate inside WIP (flow model eq 1, Refs #5545)

Agent: aprender-w5032
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… pr-flow to subcommand table (flow model eq 7) (Refs #5511)

Mutation: dropping t_rev from the arm delay -> dL 0, test RED; restored GREEN.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e 0.95 assumption (flow model eq 2) (Refs #5511)

Mutation: zeroing the blocked-time term makes the capped case read 1.0, test RED; restored GREEN.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…checks, reviewer lanes, per-tier review minutes (flow model eq 7) (Refs #5511)

Falsifier: concurrent review with t_rev <= check wall saves the serial t_rev within 5%.
Mutations: concurrent arming disabled -> RED; lane release dropped -> RED; restored GREEN.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ue wait is the pass in flight, not the batch timer (Refs #5511)

Root cause of sim W below law W on design D: the law took round inputs
(w=5, c_wall=30, pass=30) and used the 5-minute batch timer as the merge
queue wait. With one build at a time the build slot is busy, so an armed
PR waits out the pass in flight plus any overflow past the batch size
(17.2 min, not 5). The checks term ran 9.7 min high and the queue term
7.8 min low; they partly cancelled into a plausible gap. This line has no
rebase path, so p_dirty = 0 and rebase cannot explain it.

The sim now reports stage times (run wall, open->green, green->armed,
armed->merged, wait for first pass, pass wall) and the --json block gains
a "law" object: eq 7 evaluated on the design's own config with the queue
waits read from the run, term by term, beside predicted.W_min_mean.
Design D: sim 82.0 vs law 82.0 min (0.05%); G 0.12%, E 0.10%.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…i-commands-v1; regen contracts.nt and shapes.ttl with the repo-built pv (Refs #5511)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…CHEMA-026); regen ONT witness and README contract count (Refs #5511)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…003 (Refs #5511)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…q 6 law, build at eq 14 law (RED; flow model B5, Refs #5557)

Fan-out to R = 3 renditions with no split (eq 3), the eq 6 stage law
5 * 360 / (1440 * 2) = 62.5% within 2 points, alpha rework at 0.16 keeping
build busy at 79.5% / (1 - alpha) <= 95% (eq 14), GPU load B*t_g + (B*k + 4)*t_v
(eq 5), trunk-first GPU priority while W > 4.8 d, and t_b work (eq 2) split from
t_b elapsed (eq 1). RED: the v2 config and result fields do not exist yet.

Agent: aprender-w5032
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 2985833)
…priority, build work vs elapsed (flow model B5, Refs #5557)

Opt-in config fields; the defaults reproduce the original model, so every
existing band test is unchanged (same RNG draws, same event stream).

- fan_out: every master fans out to R = 3 renditions with no split (eq 3);
  launches_per_day = 3 * courses_per_day.
- rework_alpha: the distinctness gate sends a share alpha back to build (eq 14).
- trunk_first_w_days: the GPU serves the trunk first while the recent course W
  (last 20 completions) exceeds it, else Shorts.
- linkedin_renders_per_day, vertical_render_min: feed renders share the GPU (eq 5).
- build_elapsed_min, and result t_b_work_h / t_b_elapsed_h: build work (eq 2,
  sizing) split from build elapsed (eq 1, lead time). Ledger inputs t_b_work_h
  and t_b_elapsed_h; both, and stage_util_pct / launches_day, appear in the sim block.
- Preset factory-v2 keeps the 07:00 UTC batch, counted inside WIP.

Measured (seeds 1..5, 300 d, 20 d warm-up): stage 62.47% vs eq 6 law 62.5%;
legacy split 24.97% (= 0.4 of the law); build at alpha 0.16 94.27% vs eq 14 law
94.64%; GPU 37.6% vs eq 5 law 37.8%.

Finding: the GPU priority rule reorders work and cannot add GPU minutes. Shorts
are never dropped, so under GPU overload courses/day is the same either way and
Shorts carry the wait. The RED test that asserted +0.08 courses/day was replaced
by a mechanism test of the pick and a conservation test.

Mutation: rework disabled -> rework_at_alpha_016 RED (0.793 vs 0.947); priority
disabled -> gpu_serves_trunk_first... and gpu_priority_conserves... RED; fan-out
reverted -> coursera_stage_matches_the_law RED (0.252 vs 0.625). Restored: green.

Contract: contracts/course-flow-content-factory-v2-v1.yaml (pv validate: valid).

Agent: aprender-w5032
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit 9469789)
…-content-factory-v2

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

§13.11 rung 1 — quorum shadow verdict

S13-SHADOW pr=5584 head=7cab3550b437a7e33209d586b4de888c1aee9eeb verdict=REFUSE class=Q1 arm_rc=1

Shadow mode: this records a verdict and merges nothing. A refusal
to arm is not a block (§13 adds zero rows to §7) — the pull request is
exactly as green as it was.

@noahgift
noahgift marked this pull request as draft October 18, 2026 18:19
noahgift and others added 2 commits October 19, 2026 01:44
…nt-factory-v2 census

The B5 contracts changed the census but the witness still recorded the
old one, so ont5_consistency_gate the_spec_probe_holds_on_the_repo_corpus
failed with WitnessStale. Output of scripts/contracts_gate.sh (pv-sat).

Agent: aprender-w5032
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… squashed; keep B5 course_flow, regen README/nt/witness) (Refs #5557)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@noahgift

Copy link
Copy Markdown
Contributor Author

Closing under the P7 WIP freeze (open ≤10): stale. Its base #5559 merged at 02:23Z, so this stacked draft is CONFLICTING and has had no seats. Branch batch/b5-content-factory-on-5559 is kept; reopen as a fresh PR rebased on main once the freeze lifts.

@noahgift noahgift closed this Oct 19, 2026
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