Skip to content

fix(T-2): apr finetune --max-seq-len is honoured on the wgpu instruct pipeline or refused with the documented code — never clamped to 512; one effective_max_seq_len() for every path, printed (PMAT-1009, #2924) - #3005

Closed
noahgift wants to merge 15 commits into
mainfrom
agent/T-2

Conversation

@noahgift

@noahgift noahgift commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

PP-066 DAG row T-2 (spec §5 "--max-seq-len honoured or refused, never clamped"; S0-11; #2526; epic #2873; ticket PMAT-1009; receipt docs/audits/impl-PMAT-1009-receipt.md, status: partial until merged).

The defect: apr finetune --gpu-backend wgpu --max-seq-len 1024 silently trained at 512 — the wgpu instruct pipeline hardcoded 512, // max_seq_len (finetune.rs:717) and dropped the CLI value; the instruct path honoured it since #2247, so a training receipt could record a configuration the engine never ran (T-0's apr arm cannot be paired until every path is honest).

What lands: one effective_max_seq_len(requested, path) -> Result<usize> for SeqLenPath::{Instruct, Wgpu, Classify} — Some(n) is Ok(n) or ValidationFailed (exit 5, read from error.rs), None is the path's default; the 512 literal is gone; every path prints Max seq len: <effective>. Case table finetune_seq_len_truth_tests.rs (RED first at 64e3d03: the function did not exist): {256, 512, 1024, 2048} × three paths, the default row, the refusal-code row. Contract contracts/apr-finetune-config-truth-v1.yaml (kind: pattern); README 1812 contracts.

Acceptance, re-run by the orchestrator on 2beca0d

A_i rc
cargo test -p apr-cli --lib finetune_seq_len_truth 0 (4 passed)
cargo test -p apr-cli --lib finetune (80 tests) 0
cargo fmt --all -- --check · cargo clippy -p apr-cli --lib -- -D warnings 0 · 0
pv validate · pv lint · check_contract_test_binding.sh · check_contract_enforcement.sh · check_readme_claims.sh · check_no_claim_literals.sh · check_roadmap_diff_additive.sh valid · PASS · 0 ×5

Mutation — RED, then restored GREEN: the Wgpu branch returns Ok(512) regardless of the request → effective_max_seq_len_wgpu_never_clamps_to_the_old_512_literal FAILED, effective_max_seq_len_honours_every_requested_value_on_every_path FAILED (2/4) → restored 4/4.

Recorded: the card's --test finetune_seq_len_truth integration target became a #[cfg(test)] module of commands::finetune (an integration test cannot reach the crate-private commands tree; the lib.rs seam is blocked by the pre-commit complexity gate on pre-existing debt — same finding as R-3); the test drives the pure function, an end-to-end wgpu run is T-0's harness. Receipt for this PR itself: advisory, not produced (driver A1).

no-close: #2873 is the epic this row implements one item of, and the remaining refs are cited as context; an epic is not closed by one of its rows.

…e 512 literal at finetune.rs:717 is gone); one effective_max_seq_len() for every path, printed as Max seq len (PMAT-1009, #2924)

Pmat-Ticket: PMAT-1009
…ve max_seq_len equals the request or the command refuses with the documented code; README contract count 1812 (PMAT-1009, #2924)

Pmat-Ticket: PMAT-1009
@noahgift
noahgift enabled auto-merge September 6, 2026 05:47
@github-actions

github-actions Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

§13.11 rung 1 — quorum shadow verdict

S13-SHADOW pr=3005 head=7c403a266ef1233a2c87e8d5ef1f41608780e1ff 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 added this pull request to the merge queue Sep 6, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 6, 2026
@noahgift noahgift added this to the 0.68.0 milestone Sep 10, 2026
@noahgift noahgift added the needs-rebase mergeStateStatus DIRTY: conflicts with main; rebase before it can enter the queue label Sep 11, 2026
@noahgift
noahgift enabled auto-merge September 13, 2026 08:26
…enerated (T-5 R-4)

Pmat-Ticket: PMAT-1098

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@noahgift
noahgift added this pull request to the merge queue Sep 13, 2026
@noahgift
noahgift removed this pull request from the merge queue due to a manual request Sep 13, 2026
check_roadmap_diff_additive.sh reported base id(s) missing at head: this branch forked before they landed on main, and a plain update takes one side of the file whole. Resolved as main's roadmap plus this branch's own new entries, each at its sorted slot among same-prefix peers. The other three roadmap guards pass on the result.

Pmat-Ticket: PMAT-1098

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@noahgift
noahgift enabled auto-merge September 13, 2026 09:17
Noah Gift and others added 2 commits September 13, 2026 12:30
check_roadmap_diff_additive.sh reported base id(s) missing at head: this branch forked before they landed on main, and a plain update takes one side of the file whole. Resolved as main's roadmap plus this branch's own new entries, each at its sorted slot among same-prefix peers. The other three roadmap guards pass on the result.

Pmat-Ticket: PMAT-1098

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
check_roadmap_diff_additive.sh reported base id(s) missing at head: this branch forked before they landed on main, and a plain update takes one side of the file whole. Resolved as main's roadmap plus this branch's own new entries, each at its sorted slot among same-prefix peers. The other three roadmap guards pass on the result.

Pmat-Ticket: PMAT-1098

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@noahgift
noahgift added this pull request to the merge queue Sep 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Sep 13, 2026
noahgift and others added 2 commits September 14, 2026 02:57
…enerated (T-5 R-4)

Pmat-Ticket: PMAT-1098

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
check_roadmap_diff_additive.sh reported base id(s) missing at head: this branch forked before they landed on main, and a plain update takes one side of the file whole. Resolved as main's roadmap plus this branch's own new entries, each at its sorted slot among same-prefix peers. The other three roadmap guards pass on the result.

Pmat-Ticket: PMAT-1098

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@noahgift
noahgift added this pull request to the merge queue Sep 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Sep 14, 2026
One conflict, docs/audits/impl-estimates.jsonl, append-only, resolved as the
union with main's rows first. #3001 at ~07:05Z, #3093 at ~08:35Z, this at
~08:45Z — three identical resolutions in under two hours.

#3256 is the fix: `docs/audits/*.jsonl merge=union` in .gitattributes, with a
guard holding the scope (149 goldens and datasets must NOT be union-merged).
Once that lands this conflict stops existing.

Pmat-Ticket: PMAT-1098

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noahgift
noahgift enabled auto-merge September 14, 2026 08:33
noahgift added a commit that referenced this pull request Sep 14, 2026
… the conflict was right

Two conflicts.

docs/audits/impl-estimates.jsonl — append-only, resolved as the union with main's
rows first. Fourth time today (#3001, #3093, #3005, this); #3256 makes it stop.

README.md — the CONTRACT_COUNT block, 1839 on this branch against 1837 on main.
Taking either side would have been wrong: the branch ADDS contracts, so the
merged tree is neither number. CLAUDE.md's rule for this table is explicit —
"the table gives the command, and the value is only a dated sample. If a number
here disagrees with its command, the command wins."

    find contracts -name '*.yaml' | wc -l   ->  1840

Set to 1840 at both blocks, and check_readme_claims.sh agrees:

    PASS FALSIFY-README-002 contract_count: 1840 (CONTRACT_COUNT block, derived
    by scripts/readme_sync.sh; 1 block(s) agree with the merge tree 259c8f7)

A generated value is not a text conflict to pick a side of. It is a question with
a command attached.

Pmat-Ticket: PMAT-1098

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noahgift
noahgift disabled auto-merge September 14, 2026 17:42
@noahgift
noahgift enabled auto-merge September 14, 2026 18:37
@noahgift
noahgift disabled auto-merge September 14, 2026 22:41
The branch was cut before #3256 (768e740) declared
`docs/audits/*.jsonl merge=union`. Git reads merge attributes from the side
being merged INTO, so the declaration is invisible to every branch older than
it: the driver is retroactively inert and the ledger conflicts by hand.

Resolved with `git merge-file --union`, which is what the attribute would have
done. The file is append-only (every commit is N insertions, 0 deletions), so
the union is the whole resolution: 50 rows, 0 duplicates, every line valid JSON.
After this merge the branch carries the declaration, so the next one resolves
itself.

Pmat-Ticket: PMAT-3228

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@noahgift

Copy link
Copy Markdown
Contributor Author

stale — APR-RELEASE-001 §6, applied mechanically 2026-09-20.

No activity since 2026-09-17 13:47Z; 2 release trains have been cut since (v0.68.2, v0.68.1). Age is the only input to this sweep — it is not a judgement on the work, and a train label such as pp-066/carry-* is not an exemption.

What happens next: if one more train passes while this is still labelled stale, §6 closes it. The branch is kept — closing a PR here discards a review thread, never commits.

To clear it: push, rebase, or say on the thread what it is waiting for. Any of the three removes the label at the next sweep. If it is blocked on something external, name that here — a blocker with an owner is not sprawl, and it stops the clock.

@noahgift noahgift added the stale APR-RELEASE-001 §6: >=2 release trains with no activity label Sep 20, 2026
@noahgift

Copy link
Copy Markdown
Contributor Author

closed by 0.70 batch triage: no quorum receipt and no live owner; branch kept, reopen with an owner

Authority: per operator order (quoted) "yes, clearn up. no sovereign repo can have triage, ticket, branche issues and arbiter shoudl be doing this! tell that agent to get to work" + cop (aprender-cf) ruling on the close criteria (a draft, or >7d old with no live owner, and no quorum receipt). The operator did not select this PR individually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase mergeStateStatus DIRTY: conflicts with main; rebase before it can enter the queue stale APR-RELEASE-001 §6: >=2 release trains with no activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Epic: PP-066 — 0.66 performance-parity release

1 participant