Skip to content

fix(git): fence review snapshots and refine Host Code Mode guidance - #728

Merged
yyjeqhc merged 3 commits into
mainfrom
fix/post042-host-code-mode-audit
Sep 27, 2026
Merged

yyjeqhc merged 3 commits into
mainfrom
fix/post042-host-code-mode-audit

Conversation

@swjnxyf

@swjnxyf swjnxyf commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • strengthen workspace review source identity with a bounded porcelain-v2 status fingerprint so staged-only, index-blob, conflict/mode, untracked-classification, and same-HEAD branch changes invalidate cached review state
  • keep the frozen workspace tree on the existing private-index/safe-Git path; the real index remains untouched and only a fixed-size status digest crosses the Runner boundary
  • make review_changes.next_call directly valid against the published input schema by omitting absent optional fields while preserving explicit zero/empty values, Session, scope, and continuation
  • re-check workspace source identity after continuation diff generation so changes during the read fail closed as snapshot_stale
  • document the post-v0.4.2 Host-native Code Mode audit using bounded Codex session evidence and existing sf ActionAudit aggregates
  • clarify the intended Job path for Host Code Mode: continue independent DAG work after pending, prefer one wait_for_job_terminal + Host continuation when terminal is the only blocker and a real carrier exists, and reserve observe_jobs for logs/diagnostics/recovery rather than polling loops

Review

Independent review re-ran the key sf aggregates at the report's fixed cutoff and matched the documented counts/bytes exactly. The two 60/90-minute high-density Window samples also reproduced exactly. /root/git/codex was inspected read-only at 8f195c93d; its Code Mode execute/delegate code supports the report's responsibility split around Host-native schemas, dispatch gates, cancellation, ToolCallRuntime and bounded output handling.

No additional production-code defect was found in 0613f38e. A review-only documentation commit (fd3ca23f) narrows the Job recommendation so the target architecture is not misread as same-cell observe_jobs polling. It also makes the audit's pre-PR/no-deploy statements explicitly time-scoped.

Evidence boundaries

  • Codex call→output timings are cell response/handoff timing, not full child-process lifetime or pure VM CPU time
  • ActionAudit serialized_result_bytes is not Host-final model-context bytes
  • density-selected Window samples are descriptive, not causal A/B evidence
  • WebCodex request gaps are not renamed as model turns, Host stalls, or network latency without separate evidence
  • Work Result state refresh traffic is kept separate from model-turn optimization

Host-native Code Mode follow-up

The next optimization should validate and replay short deterministic Host chains using the existing tool contracts rather than add another execution engine:

  1. schema-validate generated next_call / recovery arguments and distinguish mechanically-followable paging from Job fallback state
  2. prefer existing native batches; keep mechanically determined search/read/edit/validation steps in one Host cell while preserving revisions/cursors/failure states
  3. after execution_state=pending, continue independent work and rely on passive terminal attention where possible
  4. if terminal is the hard dependency and no independent work remains, arm one terminal wait with a real Host carrier and yield for Host continuation; do not poll the same Job inside a cell or return to the model every 5-second observation slice
  5. compare fixed replay tasks before considering new persistent telemetry or lower-level execution changes

Validation

  • cargo test -p webcodex --lib review_: 59 passed / 0 failed
  • cargo test -p webcodex --lib changes: 132 passed / 0 failed
  • cargo test -p webcodex-tool-contracts: 241 passed / 0 failed
  • cargo test -p webcodex --lib: 3018 passed / 0 failed / 3 ignored
  • cargo check --all-targets --all-features -p webcodex -p webcodex-tool-contracts: passed
  • cargo fmt --all -- --check: passed
  • git diff --check: passed
  • git diff origin/main...HEAD --check: passed

Existing test-only dead-code warnings remain (poll_start_validation_job_with_timeout, and ObservedRunnerRequest.login under all-features checks).

Deployment

Server deployment status: NOT DEPLOYED BY THIS TASK.

No deploy, restart, reload, publish, sf service configuration change, or /root/git/codex modification was performed.

@yyjeqhc
yyjeqhc merged commit 803736c into main Sep 27, 2026
18 checks passed
@yyjeqhc
yyjeqhc deleted the fix/post042-host-code-mode-audit branch September 27, 2026 10:54
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.

2 participants