Skip to content

fix(release): Clear import and ACP guardrail regressions - #24

Merged
camerontaylor merged 1 commit into
customfrom
fork/release-1007-guardrails
Nov 11, 2026
Merged

camerontaylor merged 1 commit into
customfrom
fork/release-1007-guardrails

Conversation

@camerontaylor

@camerontaylor camerontaylor commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Restore the exact-head fork release checks without widening any baseline. Explicitly reject Codex records without a string type and preserve JSON null for absent optional tool input/output. Compact three lines of ACP attachment documentation to keep the fork-owned session module at its existing 1200-line ceiling.

The original source passed Build & Test and all four release-platform builds; its quality job failed the code-size and swallowed-error ratchets. Both previously failing ratchets now pass locally; rustfmt and git diff --check pass. Existing Codex import regression coverage is unchanged and CI validates the exact head.

Closes #23

Summary by CodeRabbit

  • Documentation
    • Clarified descriptions of session attachment IDs and workspace roots.
  • Other
    • No user-visible behavior changes. Tool payload validation and handling of missing values remain consistent with previous behavior.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T20:56:52.208367Z cdab454 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Codex tool importer now rejects payloads with a missing or non-string type and explicitly represents missing input and output as JSON null. ACP session comments clarify the meanings of instance_id and working_dir.

Changes: Release guardrail changes

Layer / File(s) Summary
Codex tool payload handling
crates/jcode-base/src/import_codex_tools.rs:17-19, crates/jcode-base/src/import_codex_tools.rs:40, crates/jcode-base/src/import_codex_tools.rs:53-56
append_tool returns false when type is missing or not a string. Missing custom-tool input and tool output are explicitly set to JSON null.
ACP session field comments
src/cli/acp/session.rs:14-15, src/cli/acp/session.rs:28
The comments describe instance_id as a logical attachment ID and working_dir as the ACP workspace root for the project-local slash-skill overlay.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: Minimal · up to cdab4

This change restores release guardrails without altering runtime behavior in a meaningful way. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title accurately identifies the Codex import fix and ACP guardrail changes. It is concise and specific to the main changeset.
Linked Issues check Passed Issue #23 coding requirements are met. In crates/jcode-base/src/import_codex_tools.rs:14-17, append_tool now rejects a missing or non-string payload type instead of using an implicit default. At…
Out of Scope Changes check Passed The pull request changes only import_codex_tools.rs and session.rs. The import changes implement Issue #23's swallowed-error guardrail and JSON-null behavior. The session changes support the code-…
Full details: Linked Issues check

Explanation

Issue #23 coding requirements are met. In crates/jcode-base/src/import_codex_tools.rs:14-17, append_tool now rejects a missing or non-string payload type instead of using an implicit default. At :37 and :50-53, absent optional input and output values become serde_json::Value::Null. In src/cli/acp/session.rs:14-16 and :27, the documentation is compacted by three lines, which restores the 1,200-line guardrail without changing the baseline. Issue #23 also requests publishing and deploying the release; those are non-coding tasks and do not affect this assessment.

Full details: Out of Scope Changes check

Explanation

The pull request changes only import_codex_tools.rs and session.rs. The import changes implement Issue #23's swallowed-error guardrail and JSON-null behavior. The session changes support the code-size guardrail and do not change executable behavior. No unrelated change is demonstrated.

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 846e9ca9-3975-4d3d-9d6a-d9508b807de1
Commits

Reviewing files that changed from the base of the PR and between 53f56f4 and cdab454.

Files selected for processing: 2

  • crates/jcode-base/src/import_codex_tools.rs
  • src/cli/acp/session.rs

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

@cq-review

cq-review Bot commented Nov 11, 2026

Copy link
Copy Markdown

Independent review (DeepSeek): PASS for cdab454523f0c47f1b3ccb76e9e2abc95e52bb54

Scope: diff 53f56f4978477d46051af4a1f56a5b719748cbc2..cdab454523f0c47f1b3ccb76e9e2abc95e52bb54 against base custom (head re-checked immediately before posting). Two files, 11 insertions / 12 deletions. No scripts/fork/*.json baseline is touched.

Behavior equivalence

  • append_tool type guard: base computed kind = payload["type"].as_str().unwrap_or_default(), so a missing or non-string type became "" and reached the match's _ => return false arm. Head returns false for exactly those inputs before the match. Every previously reachable arm is still reachable; the only rerouted inputs already returned false. crates/jcode-base/src/import.rs:1120 treats false as "fall through to generic line handling" in both versions, so importer output is unchanged.
  • input / output: base used Option<Value>::unwrap_or_default(); impl Default for Value returns Value::Null (serde_json 1.0.149, src/value/mod.rs:921-924). Head spells unwrap_or(serde_json::Value::Null). An absent key (None) and an explicit null (Some(Null)) both resolve to Value::Null in both versions, including the custom-call wrapper {"input": null}. Semantically identical.
  • The existing regression codex_import_preserves_native_tool_calls_and_outputs is untouched by this commit and still covers function/custom call plus output, timestamps, working dir, title and provider-safe text flattening.

Guardrails reproduced

  • Base 53f56f497 (exported tree, same scripts/baseline): check_swallowed_error_budget.py exits 1 with new swallowed-error-like usage: crates/jcode-base/src/import_codex_tools.rs (3); check_code_size_budget.py exits 1 with new oversized file exceeds 1200 LOC: src/cli/acp/session.rs (1203 LOC).
  • Head cdab45452 with JCODE_{CODE_SIZE,TEST_SIZE,PANIC,SWALLOWED_ERROR}_BUDGET=scripts/fork/*.json: all four checks exit 0. session.rs is exactly 1200 LOC and import_codex_tools.rs has 0 unwrap_or_default().
  • No baseline widening: the commit changes only the two Rust files.
  • rustfmt --edition 2024 --check crates/jcode-base/src/import_codex_tools.rs src/cli/acp/session.rs exits 0.

CI

GitHub Actions had an official outage at review time; Quality Guardrails, Build & Test and the Windows Companion legs were queued, not failed. This verdict covers the exact SHA's code and the two previously failing ratchets reproduced locally. It does not attest green CI.

Findings

None (no P1/P2/P3).

Note, not a finding: src/cli/acp/session.rs now sits exactly at the 1200-line ceiling, so any future growth in that module must come with a matching reduction.

@camerontaylor
camerontaylor merged commit 67d63a6 into custom Nov 11, 2026
9 checks passed
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.

Release 1007: restore exact-head fork guardrails

1 participant