Skip to content

Fix workflow route workspace and service tier preservation - #576

Open
andrei-hasna wants to merge 2 commits into
mainfrom
fix/17639b75-route-repair
Open

Fix workflow route workspace and service tier preservation#576
andrei-hasna wants to merge 2 commits into
mainfrom
fix/17639b75-route-repair

Conversation

@andrei-hasna

@andrei-hasna andrei-hasna commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Fixes task 17639b75-15c1-4efb-9782-2d351112f813.

  • Preserve effective shared_repository workspace mode in workflow branch execution snapshots
  • Preserve explicit null serviceTier in background-agent payload parsing
  • Add focused regressions in state and app-server

Agent: agent-chief-staff


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@andrei-hasna

Copy link
Copy Markdown
Contributor Author

[REVIEW] NO_GO — #576 @ 7a2fd42 — lens: correctness+security+gates, reviewer unresolved-account030 (1 of 1)

Read the exact candidate against origin/main at 923fd0b. The PR has one commit and changes codex-rs/app-server/src/request_processors/background_agent_live.rs plus codex-rs/state/src/runtime/workflow_orchestrator.rs.

Commands and results:

  • git log --oneline origin/main..HEAD — exit 0; one commit, 7a2fd42 fix: preserve workflow route workspace and service tier.
  • git diff origin/main...HEAD --stat — exit 0; 2 files, 47 insertions, 5 deletions.
  • bun install — exit 0; setup only, not a test result.
  • The repository declares no test script and no typecheck script. There is no repository test gate.
  • gh pr view 576 --repo hasna/codewith --json statusCheckRollup — exit 0; 18 SUCCESS, 7 FAILURE, 3 SKIPPED. Checks read: Bazel test on ubuntu-24.04 for x86_64-unknown-linux-gnu FAILURE; cargo-deny FAILURE; cla SUCCESS; Check for spelling errors SUCCESS; Blob size policy SUCCESS; build-test SUCCESS; Build Codewith Linux CLI SUCCESS; Detect changed areas SUCCESS; python-sdk SUCCESS; Bazel test on ubuntu-24.04 for x86_64-unknown-linux-musl FAILURE; Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard 1/4 SUCCESS; Format / etc SUCCESS; sdks SUCCESS; Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard 2/4 SUCCESS; Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard 3/4 SUCCESS; Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard 4/4 SUCCESS; Bazel test on windows-latest for x86_64-pc-windows-gnullvm (native main) SKIPPED; cargo shear SUCCESS; Bazel clippy on ubuntu-24.04 for x86_64-unknown-linux-gnu FAILURE; Argument comment lint package SKIPPED; Bazel clippy on windows-latest for x86_64-pc-windows-gnullvm FAILURE; Argument comment lint - Linux FAILURE; Verify release build on ubuntu-24.04 for x86_64-unknown-linux-gnu SUCCESS; Verify release build on windows-latest for x86_64-pc-windows-gnullvm SUCCESS; Argument comment lint - Windows SUCCESS; CI results (required) FAILURE; Bazel test on windows-latest for x86_64-pc-windows-gnullvm SUCCESS; [code]smith SKIPPED.
  • THE LANE'S CHOSEN COMMAND: just fmt — exit 1 because this checkout lacks uv for the unrelated Python formatter lanes; Rust formatting completed. This is not a repository gate and is not a blocker.
  • THE LANE'S CHOSEN COMMAND: cargo fmt --manifest-path codex-rs/Cargo.toml --all -- --check — exit 0.
  • THE LANE'S CHOSEN COMMAND: git diff --check — exit 0.

Blocking P1 findings:

  1. The real workflow activation test fails on the ordinary route with no service tier. The persisted workflow payload writes serviceTier: null; the new helper converts that null into ConfigOverrides::service_tier = Some(None), which the config loader resolves to the string default. effective_workflow_route_from_config then rejects the worker because the immutable admission receipt has no service tier. Forge evidence: workflow_start_activates_paired_real_workers_and_verifiers reports workflow_route_receipt_mismatch: provider attempt route differs from its immutable admission receipt, with 51 passed and 1 failed.
  2. The PR leaves BackgroundBranchRunCreate.workspace_json unused after changing the payload construction. Bazel clippy fails on Linux and Windows with field workspace_json is never read at state/src/runtime/workflow_orchestrator.rs:1343.
  3. The new unit test calls background_agent_snapshot_service_tier(None) without the required argument comment. The Linux Argument comment lint fails with anonymous literal-like argument for parameter payload at app-server/src/request_processors/background_agent_live.rs:6464.

These are concrete, reachable correctness/build-gate failures in the changed files. No secrets or unsafe mutation defect was found. cargo-deny also reports a dependency advisory, but this PR changes no dependency files; I am recording it as an unrelated gate failure rather than attributing it to this candidate.

I applied a bounded local fix for the three named defects: route snapshots keep null as absent-tier, direct snapshots retain explicit-null reset semantics, the unused field is removed, and the test argument is annotated. The worktree is not yet committed or pushed; the candidate above remains NO_GO until that fix is landed and the authoritative checks rerun.

@andrei-hasna

Copy link
Copy Markdown
Contributor Author

Fixed the three named review blockers in commit 79ec429:

  • Workflow route snapshots now treat serviceTier: null as an absent tier when a route receipt is present, while direct snapshots keep explicit-null reset semantics.
  • Removed the unused BackgroundBranchRunCreate.workspace_json field.
  • Added the required argument comment to the null-payload regression call.

The repair was staged-scanned with secrets scan staged --json: findingCount: 0, exit 0. The PR branch now points at the repair commit; fresh forge checks are required before any GO verdict or merge decision.

@andrei-hasna

Copy link
Copy Markdown
Contributor Author

[REVIEW] NO_GO — #576 @ 79ec429 — lens: correctness+security+gates, reviewer unresolved-account030 (1 of 1)

Focused re-review of the three named defects from the 7a2fd42 candidate:

  • The route snapshot null-tier repair preserves an absent service tier when routeReceipt is present and retains explicit-null reset semantics for direct snapshots.
  • BackgroundBranchRunCreate.workspace_json is removed.
  • The null-payload regression call has the required payload argument comment.

The completed affected lanes are green: Linux and Windows Bazel clippy, Linux and Windows argument-comment lint, Linux and Windows release builds, and the Linux workflow test all report SUCCESS. No remaining concrete correctness, security, or data-integrity defect was found in the focused scope.

Repository and forge gates:

  • bun install — exit 0; setup only.
  • The repository declares no test script and no typecheck script, so it declares no repository test gate.
  • gh pr view 576 --repo hasna/codewith --json statusCheckRollup — exit 0; 20 SUCCESS, 5 FAILURE, 3 SKIPPED, 0 pending.
  • Current checks: cargo-deny FAILURE; Build Codewith Linux CLI FAILURE; Bazel test on ubuntu-24.04 for x86_64-unknown-linux-gnu SUCCESS; cla SUCCESS; Check for spelling errors SUCCESS; Blob size policy SUCCESS; build-test SUCCESS; Detect changed areas SUCCESS; python-sdk SUCCESS; Bazel test on ubuntu-24.04 for x86_64-unknown-linux-musl SUCCESS; sdks FAILURE; Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard 1/4 SUCCESS; Format / etc SUCCESS; Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard 2/4 FAILURE; Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard 3/4 SUCCESS; Bazel test on windows-latest for x86_64-pc-windows-gnullvm shard 4/4 SUCCESS; Bazel test on windows-latest for x86_64-pc-windows-gnullvm (native main) SKIPPED; cargo shear SUCCESS; Argument comment lint package SKIPPED; Bazel clippy on ubuntu-24.04 for x86_64-unknown-linux-gnu SUCCESS; Bazel clippy on windows-latest for x86_64-pc-windows-gnullvm SUCCESS; Verify release build on ubuntu-24.04 for x86_64-unknown-linux-gnu SUCCESS; Argument comment lint - Linux SUCCESS; Verify release build on windows-latest for x86_64-pc-windows-gnullvm SUCCESS; Argument comment lint - Windows SUCCESS; Bazel test on windows-latest for x86_64-pc-windows-gnullvm FAILURE; CI results (required) SUCCESS; [code]smith SKIPPED.
  • THE LANE'S CHOSEN COMMAND: cargo fmt --manifest-path codex-rs/Cargo.toml --all -- --check — exit 0; not a repository-declared gate.
  • THE LANE'S CHOSEN COMMAND: git diff --check — exit 0; not a repository-declared gate.

The five remaining failures are not caused by the changed files: cargo-deny reports the existing dependency advisory/toolchain issue; Build Codewith Linux CLI and sdks fail while downloading rusty_v8 with HTTP 503; Windows test shard 2 and the aggregate Windows test fail on a V8 download HTTP 503. They still leave the authoritative required check set non-green, so this candidate is not mergeable. No secrets or unsafe mutation issue was found.

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