Skip to content

fix(aprender-orchestrate): cmd_code arg-count drift — pass None for emit_trace#1513

Merged
noahgift merged 1 commit intomainfrom
fix/aprender-orchestrate-cmd-code-arg-drift
May 5, 2026
Merged

fix(aprender-orchestrate): cmd_code arg-count drift — pass None for emit_trace#1513
noahgift merged 1 commit intomainfrom
fix/aprender-orchestrate-cmd-code-arg-drift

Conversation

@noahgift
Copy link
Copy Markdown
Contributor

@noahgift noahgift commented May 5, 2026

Summary

Upstream `batuta::agent::code::cmd_code` gained an 8th `emit_trace: Option` param; the bin-side thin wrapper in `cli/code.rs` was not updated, producing E0061 that blocks `cargo check --workspace` and the clean-room gate.

Fix

Pass `None` for `emit_trace` at the bin wrapper. The bin's clap surface (`Commands::Code`) doesn't yet expose `--emit-trace`; threading it through is a future enhancement. This minimal fix un-blocks the v0.32.0 cascade publish.

Verification

  • `cargo check -p aprender-orchestrate --bin aprender-orchestrate` → 0 errors
  • `cargo check --workspace` → 0 errors, 91 pre-existing warnings

Why now

Pre-cascade-publish gate (per `crates/aprender-orchestrate/CLAUDE.md` release policy). Without this, clean-room fails and cascade is blocked.

🤖 Generated with Claude Code

…mit_trace

The upstream `batuta::agent::code::cmd_code` (in
crates/aprender-orchestrate/src/agent/code.rs) gained an 8th
`emit_trace: Option<PathBuf>` parameter. The bin-side thin wrapper
in `cli/code.rs` was not updated, producing E0061:

  error[E0061]: this function takes 8 arguments but 7 arguments
  were supplied
    --> crates/aprender-orchestrate/src/cli/code.rs:23

This blocked `cargo check --workspace` and would block the
clean-room build that gates `cargo publish` per the stack-wide
release policy in `crates/aprender-orchestrate/CLAUDE.md`.

## Fix

Pass `None` for `emit_trace` at the bin wrapper level. The bin's
clap surface (`Commands::Code` in `main_dispatch.rs`) does not yet
expose `--emit-trace`; threading it through is a separate future
enhancement. For now, the workaround preserves the existing
7-field clap variant + restores workspace compilability.

## Verification

  $ cargo check -p aprender-orchestrate --bin aprender-orchestrate
    Finished `dev` profile (0 errors)
  $ cargo check --workspace
    Finished (0 errors, 91 pre-existing warnings)

## Five Whys

1. Why did the bin wrapper drift? Upstream lib added an 8th param;
   no follow-up PR threaded it through the clap surface.
2. Why didn't CI catch it earlier? `cargo check --workspace` would
   have flagged it; either the change landed without that gate or
   was masked by feature flags. Investigation out of scope.
3. Why fix at the wrapper instead of the clap surface? Smaller
   delta; preserves the existing 7-field clap variant; un-blocks
   clean-room + cascade publish today. Threading the new param
   through clap requires roadmap discussion.
4. Why pass `None` for emit_trace specifically? It's an optional
   trace-output path; `None` matches the pre-drift behavior (no
   trace emitted unless explicitly opted in).
5. Why now? Pre-cascade-publish gating — without this, the
   workspace doesn't compile and clean-room fails.

Refs: SPEC-SHIP-TWO-001 0.32.0 cascade,
      crates/aprender-orchestrate/CLAUDE.md release policy

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@noahgift noahgift enabled auto-merge (squash) May 5, 2026 12:24
@noahgift noahgift merged commit 1ecf3aa into main May 5, 2026
11 checks passed
@noahgift noahgift deleted the fix/aprender-orchestrate-cmd-code-arg-drift branch May 5, 2026 12:47
noahgift added a commit that referenced this pull request May 5, 2026
…h + 4 release-engineering defects closed (#1520)

§58 records the parallel release-engineering track that landed during the §57 drift-sweep wait:
the v0.32.0 user-facing-crate cascade publish (Issue #1514 CLOSED) and the four hidden defects
it surfaced + closed.

User-facing crates now live on crates.io at v0.32.0:
  - aprender = "0.32.0"
  - aprender-rag = "0.32.0"
  - aprender-core = "0.32.0"
  - apr-cli = "0.32.0"

Defects closed during cascade (each in its own PR):
  - #1512 aprender-rag [lib] name = "trueno_rag" → "aprender_rag" BREAKING
  - #1513 aprender-orchestrate cmd_code 7→8 arg drift on emit_trace addition
  - #1515 aprender-core path-only dev-deps (publish-time cycle break)
  - #1517 aprender-core permissive version + path (clean-room sed-strip robustness)
  - #1518 apr-cli aliases.yaml in-crate copy (include_str scope fix)

Plus PR #1511 (pv-lint --strict-test-binding) closes §57.4's foreshadowed prevention rule.

5g.1 corpus retokenize (PID 2767124) at 62 shards / 16h19m wall (manifest pending).
Ship-% unchanged: MODEL-1=91%, MODEL-2=57%. §58 is the third hygiene amendment in a row;
§59 will record 5g.1 completion when manifest emits.

Refs: #1514

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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