Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,17 @@ make gate # = no-scratch + no-secrets + design-refs
# + self-driving-test (the shell harness)
```

That is twenty-four steps, and the list is not maintained by hand: it is
`GATE_STEPS` in the `Makefile`, and `gate-parity` (`scripts/check-gate-parity.sh`)
fails if this block or CONTRIBUTING.md's stops matching it. The block had
already drifted twice before that guard existed, both times by under-reporting
a newly added guard, which is the direction that misleads — a reader runs the
short list, sees green, and believes the gate is green (#1437).
That list is not maintained by hand: it is `GATE_STEPS` in the `Makefile`, and
`gate-parity` (`scripts/check-gate-parity.sh`) fails if this block or
CONTRIBUTING.md's stops matching it. The block had already drifted twice before
that guard existed, both times by under-reporting a newly added guard, which is
the direction that misleads — a reader runs the short list, sees green, and
believes the gate is green (#1437).

Deliberately no total: the guard checks each step by name, so two PRs adding
different guards merge cleanly, while a spelled-out count is one shared cell
both must write — and two of them collided on it twice in a day, each time
leaving `main` red for everyone (#1883).

CI enforces the same steps split across three workflows:
`/.github/workflows/ci.yml`'s required job runs everything except `invariants`
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ cargo build -p stella-cli --bin stella && \
STELLA_BIN="$PWD/target/debug/stella" ./scripts/test-self-driving.sh
```

Or just `make gate`, which is the twenty-four of them in order.
Or just `make gate`, which runs all of them in order.

Do not maintain that list by hand. It is `GATE_STEPS` in the `Makefile`, and
`./scripts/check-gate-parity.sh` — itself one of the steps — fails if this fence
Expand Down
12 changes: 7 additions & 5 deletions crates/stella-pipeline/src/pipeline/witness_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fn apply_role_shaping(mut config: EngineConfig, overrides: &RoleCallOverrides) -
config.max_output_tokens = Some(max_output_tokens);
}
if let Some(params) = &overrides.params {
config.params = Some(params.clone());
config.params = Some(*params);
}
config
}
Expand Down Expand Up @@ -645,10 +645,12 @@ mod tests {
/// `EngineConfig` knob — the type system keeps it raw-call-scoped).
#[test]
fn verifier_shaping_overlays_the_worker_engine_config() {
let mut worker = EngineConfig::default();
worker.temperature = Some(0.7);
worker.max_output_tokens = Some(1000);
worker.effort = None;
let worker = EngineConfig {
temperature: Some(0.7),
max_output_tokens: Some(1000),
effort: None,
..EngineConfig::default()
};

let shaped = apply_role_shaping(
worker.clone(),
Expand Down
48 changes: 21 additions & 27 deletions scripts/check-gate-parity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,26 +66,25 @@ if [ "$count" -eq 0 ]; then
exit 1
fi

# Spelled-out numbers, because both documents spell the count in prose ("the
# fifteen of them in order") and a digit would read wrong there. Covers a range
# no plausible gate will leave.
number_word() {
case "$1" in
10) echo ten ;; 11) echo eleven ;; 12) echo twelve ;; 13) echo thirteen ;;
14) echo fourteen ;; 15) echo fifteen ;; 16) echo sixteen ;;
17) echo seventeen ;; 18) echo eighteen ;; 19) echo nineteen ;;
20) echo twenty ;; 21) echo twenty-one ;; 22) echo twenty-two ;;
23) echo twenty-three ;; 24) echo twenty-four ;; 25) echo twenty-five ;;
*) echo "" ;;
esac
}

word="$(number_word "$count")"
if [ -z "$word" ]; then
note "FAIL — $count gate steps is outside the range number_word() spells."
note " Extend the table in this script; the documents spell the count."
exit 1
fi
# ── The count is deliberately NOT checked any more ───────────────────────────
#
# Both documents used to spell the total in prose ("the fifteen of them in
# order") and this guard held them to it. That check is gone, and its removal
# is the fix for a failure it caused rather than caught (#1883).
#
# The step NAMES are checked one at a time, so two PRs that each add a
# different guard produce diffs that merge cleanly. The TOTAL is a single
# shared cell both branches must write — and each writes its own correct
# answer. On 2026-08-06 `module-reachability` and `self-driving-test` landed
# within an hour of each other, each having dutifully updated both documents
# to "twenty-four". The second merge left GATE_STEPS at 25 with the prose
# saying 24, `docs guards` went red on `main`, and every open PR inherited it.
# Twice in one day.
#
# Nothing was lost by dropping it. The count told a reader no fact the checked
# list does not already carry: if every step is named, the number of them is
# not independently knowable-wrong. It was a derived value maintained by hand,
# which is the same defect this guard exists to prevent one level up.

# CONTRIBUTING.md lists raw commands rather than make targets. Every guard is
# `scripts/check-<target>.sh` except the ones named here, and the four compile
Expand Down Expand Up @@ -130,11 +129,6 @@ for doc in "$agents" "$contributing"; do
fi
done

if ! grep -qF -- "$word" "$doc"; then
note "FAIL — $doc does not spell the gate's step count as '$word'."
note " The gate runs $count steps. Find the stale count and fix it."
fail=1
fi
done

# ── Ghosts ───────────────────────────────────────────────────────────────────
Expand Down Expand Up @@ -176,5 +170,5 @@ if [ "$fail" -ne 0 ]; then
exit 1
fi

printf 'check-gate-parity: OK — %s (%s) gate steps, named in %s and %s.\n' \
"$count" "$word" "$agents" "$contributing"
printf 'check-gate-parity: OK — all %s gate steps are named in %s and %s.\n' \
"$count" "$agents" "$contributing"
10 changes: 5 additions & 5 deletions scripts/file-size-baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@
1659 bench/terminal_bench_analysis/tests/test_tb21_evidence_contract.py
2269 crates/stella-cli/src/agent.rs
1751 crates/stella-cli/src/agent/tests.rs
4740 crates/stella-cli/src/command_deck.rs
1507 crates/stella-cli/src/fleet_cmd.rs
4691 crates/stella-cli/src/command_deck.rs
1504 crates/stella-cli/src/fleet_cmd.rs
2129 crates/stella-core/src/bus.rs
2580 crates/stella-core/src/driver.rs
3680 crates/stella-core/src/driver/tests.rs
1780 crates/stella-model/src/anthropic/tests.rs
2093 crates/stella-model/src/openai.rs
1565 crates/stella-model/src/zai.rs
1895 crates/stella-model/src/zai/tests.rs
3642 crates/stella-pipeline/src/pipeline.rs
3580 crates/stella-pipeline/src/pipeline.rs
2568 crates/stella-pipeline/src/pipeline/tests.rs
2962 crates/stella-protocol/src/event.rs
2964 crates/stella-protocol/src/event.rs
1995 crates/stella-store/src/lib.rs
2268 crates/stella-store/src/tests.rs
1916 crates/stella-store/src/usage.rs
1569 crates/stella-tools/src/media.rs
2184 crates/stella-tools/src/registry.rs
1839 crates/stella-tools/src/scripts.rs
1528 crates/stella-tui/src/deck_render.rs
1531 crates/stella-tui/src/deck_render.rs
4006 crates/stella-tui/src/deck_ui.rs
1665 crates/stella-tui/src/views/engine.rs
1611 crates/stella-tui/src/views/session.rs