Skip to content

fix(runtime)!: verify process context for progress accounting - #301

Merged
lg2m merged 79 commits into
mainfrom
fix/eng-1038-ab1-shell-reads
Oct 14, 2026
Merged

lg2m merged 79 commits into
mainfrom
fix/eng-1038-ab1-shell-reads

Conversation

@lg2m

@lg2m lg2m commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

An inherited-PATH replacement can execute a writing program named grep and suppress the old lexical progress/audit trigger. This change uses executor-produced launch evidence instead.

Process preparation captures the cleared child environment once and holds cwd. Verified reads require an explicit immutable host approval (--approve-self-contained-read-image FAMILY:SHA256), a supported literal Linux exec/read family, and approved static native bytes sealed before hashing and execution. Unsupported contexts count as Work under existing approval; failed Work also triggers audit. Workspace, configuration and session input cannot supply approvals, and attachment to an existing server rejects nonempty flags.

Schema 47 preserves main's AC3 schema 46 and atomically stores nullable bounded process receipts with results/file state/spills/finished events. Historical rows remain NULL and unqualified. Descriptor 14 records the public manifest digest. Older binaries refuse upgraded stores; public descriptor struct literals must account for the new optional field. Protocol envelopes and prompt version remain unchanged here. ADR-0060, architecture, compatibility guide and the action-bias plan describe the final behavior.

Validation: immutable source 9cbbaa7 contains main f87d5d9. cargo test --workspace -- --test-threads=1: 2341 passed, 0 failed, 14 ignored (38 report blocks, isolated tmpfs stores). cargo fmt --all -- --check, cargo clippy --workspace --all-targets --all-features -- -D warnings, and cargo build --workspace all exit 0. Published 5913650 adds only the qualification ledger receipt. Independent read-only reviews covered launch binding, host propagation and receipt atomicity. Regressions cover shadowed/changed images, held cwd replacement, 64 verified exec reads, failed writes, atomic rollback/reopen, historical NULL, invalid approvals, profile/cache inheritance and server attachment.

Conflict against current main is resolved. PR is not draft. Current-head Codex/hosted CI and matched default/process/turn/persistence performance qualification remain open; local correctness does not waive those gates.

Spec: docs/plans/action-bias.md (expanded AB1), ADR-0060.
Linear: https://linear.app/retsu-ai/issue/ENG-1038

lg2m added 19 commits October 13, 2026 15:36
Research from the live session store and the Codex, OpenCode, Pi and fx
sources shows why root runs explore instead of finishing. Shell reads
behind a leading `cd` count as work, so no root got a stall report in 30
days. The prompt has inspection-first rules and a per-directory
instruction walk. Reads come in small slices and are re-read, and direct
and read-only runs describe authority they do not have.

The action-bias plan turns this into slices AB1-AB6 with baselines,
owned paths and acceptance, and reserves ADR-0059 for AB4. Docs only.

Refs: ENG-1037
AB1–AB6: preserve analysis-only scope, declare executable direct tools, classify branch mutation aliases, search ignored instruction scopes, bound default reads honestly, keep root notices authority-neutral, and define reproducible qualification metrics and comparator prerequisites.
…bias-integrated

# Conflicts:
#	docs/plans/README.md
AB1: ab1_shell_read_verdicts_preserve_progress_and_audit and ab1_cd_prefixed_reads_report_on_request_sixty_five fail before the classifier change. Preserve the short-run sed write audit trigger. Baseline evidence is recorded; final performance qualification remains open.
AB1: count leading-cd reads and print-only sed as reads; reject known mutation, execution and dynamic-option shapes. Preserve approval semantics, bound lexical work, and share the exact Git listing predicate. Five focused regressions pass; final workspace and matched performance gates remain open.
Address second Codex review: output writers, scoped discovery, rendered-line bounds, declared authority, stable completion cutoff and actual-edit cohorts.
AB1: cover the exact command from the second plan review. Existing implementation already classifies it as work.
…hell-reads

# Conflicts:
#	docs/plans/action-bias.md
#	docs/plans/progress/action-bias.md
AB1: exact -f and --file commands from plan review already count as work; regression suite5 passes.
Address third Codex review with exact instruction basenames, sed program-file exclusions, granted-external authority and unknown scan-cap counts.
…hell-reads

# Conflicts:
#	docs/plans/action-bias.md
#	docs/plans/progress/action-bias.md

lg2m commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T17:14:22.009560Z 5913650 Manual request
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1d6b17fd5a

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/qq-core/src/approval.rs Resolved
Comment thread crates/qq-core/src/approval.rs Resolved
Comment thread crates/qq-core/src/approval.rs Resolved
lg2m added 5 commits October 13, 2026 22:53
AB1: explicit cases from fourth plan review already count as work; five focused tests pass.
AB1: six exact table cases fail before the fix. A local Git textconv fixture also proves default diff/show/log-p execute a configured helper; stat-only does not.
AB1: reject ripgrep hostname callbacks, suppress Git diff/textconv/signature helpers in canonical read forms and require leading Cargo lock guards. Permission decisions are unchanged.
…hell-reads

# Conflicts:
#	docs/plans/progress/action-bias.md

lg2m commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Head 22caed7 fixes the three source findings and independently discovered flag-position/default-textconv cases. Full workspace gates pass: 2,277 tests, 0 failed, 14 ignored; fmt, Clippy, build. Draft remains pending matched performance qualification.

lg2m commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review current head 4fb1ed1. The latest reproduced fixes and qualification limits are published; please report concrete new defects against this head, respecting settled decisions and explicit unqualified gates.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4fb1ed1fe6

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/qq-core/src/approval.rs Resolved
Comment thread docs/adr/0054-progress-means-output.md Resolved
Comment thread crates/qq-core/src/approval.rs Resolved
@lg2m
lg2m added this pull request to stack #307 October 14, 2026 15:27
Base automatically changed from docs/eng-1037-action-bias-plan to main October 14, 2026 15:27
@lg2m
lg2m marked this pull request as ready for review October 14, 2026 15:28

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4fb1ed1fe6

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/qq-core/src/approval.rs Resolved
lg2m added 7 commits October 14, 2026 08:58
AB1 expanded scope. Qualification remains in progress; integrate current main before publishing.
…l-reads

# Conflicts:
#	crates/qq-core/src/sessions/store/schema.rs
#	docs/plans/progress/action-bias.md
#	docs/plans/progress/root.md
AB1: explicit immutable host read-image approvals, sealed launch binding, schema47 receipts and descriptor14. Old binaries refuse upgraded stores; unsupported process contexts conservatively count as Work.
AB1: update descriptor14 assertion and retain failed first qualification evidence.
AB1: allocate the optional receipt only for an actual started process; preserve the narrow streaming event size.
@lg2m lg2m changed the title fix(runtime): classify cd-prefixed shell reads for progress fix(runtime)!: verify process context for progress accounting Oct 14, 2026

lg2m commented Oct 14, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review published 5913650. It contains current main f87d5d9 and fixes the merge conflict. The user expanded scope to executor context verification: immutable explicit host read-image approvals, captured environment/held cwd, sealed static Linux exec binding, actual launch-derived progress/audit, nullable atomic schema47 receipts and descriptor14. Unsupported and historical contexts stay unqualified. Workspace correctness/fmt/Clippy/build are green on immutable 9cbbaa7 (2341 passed, 0 failed, 14 ignored); 5913650 is the receipt-only commit. Matched performance remains an explicit open gate. Please assess the new trust/binding/receipt failure paths and final documented behavior.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 5913650db6

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lg2m
lg2m merged commit 007adcd into main Oct 14, 2026
7 checks passed
@lg2m
lg2m deleted the fix/eng-1038-ab1-shell-reads branch October 14, 2026 18:08
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