Skip to content

Deliver governed no-effect Codex lifecycle tracer - #157

Open
Niko4417 wants to merge 64 commits into
devfrom
epic/98-codex-tracer
Open

Deliver governed no-effect Codex lifecycle tracer#157
Niko4417 wants to merge 64 commits into
devfrom
epic/98-codex-tracer

Conversation

@Niko4417

@Niko4417 Niko4417 commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Scope

  • Accepted issue: Epic: Governed Codex lifecycle tracer — one workspace, one no-effect turn #98
  • Accepted planning-contract version: v4
  • Automated readiness record: Epic: Governed Codex lifecycle tracer — one workspace, one no-effect turn #98 (comment)
  • Accepted readiness fingerprint: ff404fd8d0f7b336b997da77e55c5a5abc8c8cab1639b8e708f0b5792c283347
  • Actual source branch: epic/98-codex-tracer
  • Accepted target branch: dev
  • Parent epic and Quality Envelope rows: Epic: Governed Codex lifecycle tracer — one workspace, one no-effect turn #98; contract/unit, failure/recovery, production composition, machine-enforced acceptance, native UI/E2E, release blackbox, security/privacy, accessibility/design, and performance/resource
  • Change classification: parity-replacement
  • Product decision, finding, or incident: Coding precedes Knowledge as risk ordering, not a value judgment. This first slice is one governed, repository-agnostic, no-effect Codex lifecycle tracer. Decision: Pin the first Codex App Server compatibility unit #99 rejected literal zero provider-local handler invocation; the implemented boundary instead prevents provider-originated operations from crossing any Keiko-controlled external-effect owner.
  • In scope: session-only workspace identity, exact Codex 0.145.0 readiness, one bounded streamed turn, cancellation/crash recovery, body-free evidence, and exact-package macOS acceptance.
  • Out of scope: repository access by Codex, tools/effects, Knowledge/RAG, editor/commands/delivery, retained content, auth enrollment, runtime download/bundling, Windows, and Linux. Contract-as-Code lifecycle activation and Epic: Contract-as-Code migration and lifecycle activation cutover (ADR-0003/ADR-0004) #49 are explicitly outside this epic.
  • Native targets, contracts, or trust boundaries affected: Tauri macOS composition, application/runtime-neutral workspace and turn contracts, supervised Codex adapter/runtime, UI port and frontend, package policy, redaction/evidence, and the bounded Accessibility test driver.

Product and architecture alignment

  • The implemented contract version and fingerprint match the automated readiness record; no semantic planning change was absorbed during implementation.
  • The change follows the Decision Addendum, CONTEXT.md, accepted ADRs, and the issue Quality Plan.
  • Existing Keiko material was used only after the recorded adapt/retire/revalidate Reuse Assessment in Epic: Governed Codex lifecycle tracer — one workspace, one no-effect turn #98 and prerequisite Record Codex tracer design adoption decisions #110.
  • This greenfield change creates no mandatory build-time or runtime dependency on Existing Keiko.
  • Product authority, policy, evidence, and privileged effects remain in their owning Native layer.
  • Any durable architecture change is recorded in an ADR.

Acceptance criteria and evidence

All rows are bound to signed exact head 73d389d3976fe029bb9f19215db11b79f4585240 and the canonical evidence generated from that head.

Acceptance criterion Evidence Exact head or artifact Result
AC1 One canonical session-only Git workspace identity; no repository context reaches Codex Workspace/application/host/UI tests; packaged AX checkpoints for selection, cancellation, and permission denial; repositoryContextBytesToRuntime: 0; repositoryBytesInEvidence: 0 73d389d3976fe029bb9f19215db11b79f4585240 Passed
AC2 Exact authenticated Codex 0.145.0 unit starts from its verified absolute path and fails closed on drift #99/#101 contracts; runtime SHA-256 1da3f4e0e96028b8a771814293c3033dafd1971f943f6c7e79b0897fe705f590; readiness, substitution, path, schema, auth, environment, and ownership tests 73d389d3976fe029bb9f19215db11b79f4585240 Passed
AC3 One bounded repository-agnostic turn streams and reaches one truthful normal terminal state task-submit, streaming, normal-completion, and terminal-summary; 182-byte accepted prompt; observed turn 7,946 ms sha256:4b9821f367dca81f40e42698285c0320ad733bb922a1955c003cf72495372336 Passed
AC4 Cancellation, races, runtime crash, and recovery produce exactly one terminal state and complete cleanup Failure-first lifecycle/host/frontend tests; run-cancellation, crash-recovery, and quit-zero-descendants; cancellation 53 ms, cleanup 171 ms, residual processes 0 73d389d3976fe029bb9f19215db11b79f4585240 Passed
AC5 Provider events cannot cross an unauthorized Keiko/external effect boundary; evidence is bounded and redacted acceptedEffects, localToolRequests, providerEffectOwnerCrossings, unquarantinedProviderEvents, redactionMatches, repository context bytes, and repository evidence bytes all 0; queue capped at 256 frames / 4 MiB sha256:4b9821f367dca81f40e42698285c0320ad733bb922a1955c003cf72495372336 Passed
AC6 Exact packaged macOS app satisfies the complete visual/accessibility/platform journey without product hooks 16/16 canonical AX checkpoints; digest-bound Light, Dark, Increase Contrast, keyboard/focus, AX semantics, readable scaling, Unicode/IME, permission, cancellation, crash recovery, and zero-residual physical observations sha256:e087c08f72298704771af80d46ae900cf5e2c1e10a8cf3d5b9a327d9a5a40941 Passed

Acceptance journey evidence

  • Applicability: Required
Journey and checkpoint Automated evidence and command Manual or platform evidence Result
J1.1 workspace selection/cancel/permission denial npm run acceptance:codex-tracer:macos; exact AX checkpoints and failure/recovery tests Exact packaged macOS arm64 folder behavior observed and digest-bound Passed
J1.2 readiness and task submission Exact runtime/auth/schema/artifact checks and task-submit Explicit no-effect/no-repository-access UI copy observed Passed
J1.3 bounded streaming streaming; projection p95 71 ms across five samples; first-visible Keiko overhead p95 535 ms across 20 authenticated samples Streaming layout/readability observed Passed
J1.4 completion/cancellation/crash recovery normal-completion, run-cancellation, crash-recovery, quit-zero-descendants Terminal, cancellation, recovery, and zero-residual behavior observed Passed
J1.5 safe evidence Complete v1 evidence schema; body-free counters/digests/durations only No task, response, repository path/content, credential, or raw protocol data recorded Passed
Accessibility and appearance keyboard-focus, voiceover-semantics, appearance-contrast, reduce-motion-applicability, scaling, unicode-ime Light, Dark, Increase Contrast, focus ring, semantic AX tree, readable scaling, and Καλημέρα 世界 observed; no nonessential motion Passed
  • Automated checks exercise user-visible outcomes rather than incidental implementation details.
  • Required failure, recovery, accessibility, visual, and platform observations are settled.

Quality Plan settlement

  • Applicable positive, negative, boundary, failure, cancellation, and recovery behavior is covered.
  • The actually wired production composition was tested with the exact packaged app and pinned real runtime.
  • Applicable security, accessibility, performance, resource, visual, and platform evidence is attached here by exact digest and command.
  • Excluded quality areas retain the rationale accepted in the issue: Windows is excluded under ADR-0006; Linux is deferred; Reduce Motion is not applicable because the surfaces contain no nonessential motion.
  • Secrets, credentials, raw customer content, private endpoints, and PII are absent from source, tests, logs, evidence, artifacts, issues, and this pull request.

Verification

  • npm ci --ignore-scripts
  • npm run quality
  • npm audit --audit-level=high — zero vulnerabilities
  • Every declared native target-specific gate passed on authoritative macOS arm64.
  • I reviewed the complete diff against requirements, contracts, trust boundaries, and failure modes.

Additional affected checks and concise results:

npm run acceptance:macos (implementation head 63a5615) passed
npm run acceptance:codex-tracer:macos            passed, 16/16 checkpoints
git diff --check origin/dev...HEAD                passed
git merge-tree --write-tree origin/dev HEAD      passed; tree 96323bfb390fffdf4b2334a2a0afa543c5f97127
control-plane coverage                           92.92% lines / 87.89% branches / 93.29% functions
frontend tests                                   55/55 passed
frontend coverage                                93.10% lines / 90.41% branches
Rust application / host / UI port tests          20/20, 155/155, 13/13 passed
canonical tracer evidence SHA-256                4b9821f367dca81f40e42698285c0320ad733bb922a1955c003cf72495372336

Independent audit and findings

  • Audit scope and dimensions: complete epic diff and accepted outcome/non-goals; correctness and lifecycle races; architecture/ownership and workspace invalidation; runtime artifact/auth/environment/stdio/process-tree trust boundaries; schema/event/effect quarantine; cancellation/recovery; redaction/evidence; performance/resources; UI/accessibility/contrast; packaging/test-hook exclusion; exact-head mergeability; commit identity/signature.
  • Audited commit: 73d389d3976fe029bb9f19215db11b79f4585240
Confirmed finding Evidence Disposition Settlement evidence or follow-up
Cancel could arrive before runtime registration and be dropped Host cancellation race review Fixed with authenticated pending request-scoped cancellation that prevents launch and does not leak to retries Failure-first host tests; complete local green bar and canonical packaged journey passed
Correlated agent deltas had a byte cap but no count/update-rate cap Runtime queue/backpressure review Fixed by enforcing the accepted 256-frame cap; overflow contains with BufferLimit Boundary regression test plus full quality and exact-package acceptance
A malformed/rejected frontend cancel acknowledgement permanently consumed cancellation Frontend lifecycle audit Fixed so only an accepted acknowledgement projects stopping; retry remains available after rejection Failure-first frontend tests; 55/55 frontend tests passed
Workspace clear/replacement could leave active authority valid, including a start-vs-change race Architecture/security audit Fixed by authenticated settlement before mutation and an atomic invalidated-generation fence; stale work fails as Failed/StaleWorkspace; fresh generation retry works Host/application regressions, complete quality, canonical physical journey
Primary text/hover, Light focus, and textarea boundaries missed the adopted contrast requirements UI/accessibility audit Corrected tokens and added machine-enforced frontend accessibility contract tests Physical Light/Dark/Increase Contrast/focus observations plus native-frontend-accessibility.test.mjs
Exact-package cleanup did not independently authenticate every staged runtime process group Performance/resource and acceptance-evidence audit Harness now authenticates each staged runtime group and verifies every group exits without name/global kills Ownership regression tests; canonical evidence reports residualProcesses: 0
Three remaining Sonar maintainability findings in acceptance/harness code Prior PR Sonar analysis Simplified acceptance I/O and macOS harness control flow without product-scope change Local static checks and full quality green; fresh exact-head Sonar analysis pending remotely
Three exact-head Codex review waves found workspace-fence, retained-evaluation, work-directory, live-region, crash-survivor, readiness, subprocess-tree, and pre-auth cleanup gaps Codex inline review on prior heads Fixed at each owning boundary through e592c0e and signed current head 842cb61; no accepted scope change All review threads resolved; 155 host tests, 20 acceptance-I/O tests, full quality, physical observation, and canonical exact-head acceptance passed
Canonical acceptance exposed a missing await after the subprocess runner became asynchronous Local fail-closed rejection while the authoritative package gate continued Awaited package acceptance and added a synchronization regression in signed current head 842cb61 Focused regression, full quality, and canonical acceptance passed with zero residual processes
Remote OSV and Dependency Review found newly published high-severity GHSA-2v37-7h3g-55p8 in transitive nanoid 3.3.16 Exact-head supply-chain review Patched to 3.3.18 and refreshed the lockfile, package policy, notices, and dependency-bound accessibility evidence without weakening a gate Root and frontend audits report zero vulnerabilities; complete quality and canonical exact-package acceptance passed; current-head remote scans pending
Late Codex review found startup crash survivors were not reconciled before rendering, retained process groups lacked full start-identity revalidation, and provider-profile snapshots were unbounded Final-head Codex inline review Fixed at the owning runtime and acceptance boundaries: synchronous startup reconciliation, exact PID/start-time identity before every signal, and streamed snapshots capped at 8 MiB, 2,048 entries, depth 16, and 5 seconds Signed 63a5615; focused regressions, 155 host tests, refreshed permission matrix, full quality, and exact-head canonical journey passed
Added fail-closed branches reduced native branch coverage below the mandatory 85% bar Final local green-bar run Added focused startup-root and process-publication failure tests without changing product behavior Signed 73d389d; native branch coverage 85.15% (1,061/1,246), complete quality passed
  • Findings are evidence-cited; speculative observations are advisory rather than blockers.
  • Every confirmed finding is resolved, explicitly accepted by an authorized human, or linked to a scoped follow-up that does not invalidate current acceptance.
  • Verification and audit were repeated after the latest implementation or audit fix.

Integrated epic acceptance

  • Applicability: Required
  • Production-composition result: Passed against the exact packaged Tauri app and verified, human-authenticated Codex 0.145.0 runtime; no mocks, repository access, product hooks, or effect capabilities.
  • Machine-enforced acceptance result: Complete v1 evidence on exact signed head; 16/16 checkpoints; all prohibited-effect, redaction, missing-row, hidden-retry, and residual-process counters zero.
  • macOS evidence: Authoritative local macOS arm64; executable SHA-256 e087c08f72298704771af80d46ae900cf5e2c1e10a8cf3d5b9a327d9a5a40941; package manifest SHA-256 ff57531382fa6aba8bf95e538312bcddd87d03d8948da1d7291b4fdb021059f3; tracer evidence SHA-256 4b9821f367dca81f40e42698285c0320ad733bb922a1955c003cf72495372336.
  • Windows evidence: Explicitly excluded under ADR-0006; requires a separately accepted productive Windows foundation and runtime qualification.
  • Manual usability, accessibility, visual, signing, or packaging evidence: Exact package observed in Light, Dark, and Increase Contrast with visible keyboard focus, semantic AX hierarchy, readable scaling, Unicode/IME input, permission denial, cancellation, crash recovery, and zero residual processes. Exact head has a valid ED25519 signature for niko.vasilopoulos96@gmail.com.

Delivery

  • Target path: epic/standalone -> dev
  • The target branch matches the delivery path accepted in the issue; no direct push, force push, gate bypass, finding dismissal, or authority widening occurred.
  • Commits are signed and every required check is bound to the exact current head and expected producer. The delivery head and every finalization commit created after the maintainer's private-email/signing direction are GitHub-verified for niko.vasilopoulos96@gmail.com; historical sync 8f09eed predates that direction, is disclosed here, and will not become a target-branch commit under the required human squash merge.
  • Advisory tools are not treated as required merge authority under the current quality-gate policy.
  • Documentation, ADRs, contracts, known limitations, and follow-ups are current. All implementation children are closed and integrated; pre-activation lifecycle labels on Defect: Make Codex cleanup coverage proof deterministic #101 and Integrated packaged macOS acceptance for the Codex tracer #104 remain inert metadata and are not altered by this epic.
  • A draft pull request was not promoted to Ready for Human Review before every required Acceptance Journey result and exact-head gate was complete.

Residual risks and follow-ups

  • The accepted pinned Codex 0.145.0 compatibility unit is intentionally narrow and must be requalified before any runtime/version change.
  • Contract-as-Code lifecycle activation, including normalization of pre-activation child labels, belongs to Epic: Contract-as-Code migration and lifecycle activation cutover (ADR-0003/ADR-0004) #49 and is intentionally untouched here.
  • The separate minimal Knowledge Capsule epic remains the next planned capability. Knowledge-to-coding integration remains deferred until both epics merge.
  • GitHub reports one existing moderate Dependabot alert on the default branch; local root and frontend npm audits report zero vulnerabilities, and remote Dependency Review, CodeQL, OSV, Socket, and Sonar results remain authoritative for this PR.

This epic pull request stops at Ready for Human Review. Only Niko or Oscharko may manually initiate its merge into dev; no agent auto-merge or merge authority is claimed.

Niko4417 and others added 9 commits July 25, 2026 11:05
* feat(evaluation): reject Codex compatibility unit (#99)

* fix(evaluation): close Codex rejection evidence (#99)

* fix(evaluation): canonicalize Codex schema evidence (#99)

* fix(evaluation): refresh Codex evidence binding (#99)

* fix(evaluation): keep compatibility tests platform-bound (#99)

* fix(evaluation): bind macOS arm64 test authority (#99)
* feat(evaluation): define macOS accessibility driver decision (#111)

* fix(evaluation): stabilize System Events observations (#111)

* docs(evaluation): record macOS accessibility decision (#111)

* test(evaluation): preserve accessibility evidence bytes (#111)

* fix: harden macOS accessibility evaluation

* docs: retain macOS accessibility evaluation evidence

* docs: reject unauthenticated System Events evidence

* fix: reject System Events before Apple Events activity

* docs: supersede macOS accessibility evidence

---------

Co-authored-by: n.vasilopoulos <n.vasilopoulos@itgain.de>
* feat: bind a session-only local workspace (#100)

* test: close workspace host failure branches (#100)

* fix: preserve workspace failure isolation (#100)

* fix: make workspace cleanup generation-safe (#100)

---------

Co-authored-by: n.vasilopoulos <n.vasilopoulos@itgain.de>
Implements the accepted #101 runtime-readiness slice for epic #98, with exact-head verification and completed acceptance/audit evidence.
Delivers the accepted #102 v7 slice to epic/98-codex-tracer with exact-head technical, packaged macOS, accessibility, visual, audit, and review evidence complete. The inactive lifecycle coordinator failure is the known out-of-scope defect #147; current issue and PR contracts are green.
* Implement governed Codex turn cancellation

* Fix cancellation review findings

* Cover containment terminal precedence
* test: add packaged Codex tracer acceptance

* test: accept persisted packaged start state

* test: harden packaged macOS picker traversal

* test: read Codex login status stream

* test: stabilize packaged macOS picker navigation

* test: stabilize physical Codex acceptance

* test: measure local projection after input

* test: isolate acceptance process environment

* test: preserve tracer prompt bytes on Windows
Comment thread quality/codex-tracer-acceptance.mjs Fixed
Comment thread quality/macos-accessibility-driver-harness.mjs Fixed
@Niko4417
Niko4417 marked this pull request as ready for review August 2, 2026 14:52
@Niko4417
Niko4417 requested a review from oscharko as a code owner August 2, 2026 14:52
@Niko4417

Niko4417 commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 8a3cb2ef0b

ℹ️ 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 native/crates/keiko-host-macos/src/runtime.rs
Comment thread quality/codex-tracer-acceptance-io.mjs Outdated
Comment thread native/crates/keiko-host-macos/src/runtime.rs
Comment thread native/crates/keiko-host-macos/src/runtime.rs
Comment thread native/crates/keiko-host-macos/src/runtime.rs Outdated
Comment thread native/crates/keiko-host-macos/src/runtime.rs Outdated
Comment thread native/crates/keiko-host-macos/src/runtime.rs
Comment thread native/crates/keiko-host-macos/src/runtime.rs Outdated
Comment thread quality/native-architecture-contract.mjs
Comment thread quality/macos-accessibility-driver-harness.mjs Outdated
@Niko4417
Niko4417 marked this pull request as draft August 2, 2026 15:13
@Niko4417

Niko4417 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

Exact-head remediation evidence for abc858c:\n\n- The two confirmed Codex P1 gaps are fixed: ChatGPT/OpenAI provider routing is pinned, and ExitRequested is prevented while runtime cleanup is unproven.\n- The update_plan finding is dispositioned against accepted parent #98 v4 and child #101 v5: bounded provider-internal inert plan/activity quarantine is explicitly authorized; zero effects means zero Keiko/external effect-owner crossings.\n- All three Codex threads have replies and are resolved.\n- Commit signature: valid Git SSH signature for niko.vasilopoulos96@gmail.com.\n- npm run quality: passed in full with Node 24.18.0 / npm 11.16.0.\n- npm audit --audit-level=high: 0 vulnerabilities.\n- Frontend 55/55; application 20/20; host 142/142; UI contracts 13/13.\n- Control-plane coverage: 92.95% lines, 87.82% branches, 93.48% functions.\n- Native coverage: 93.10% lines, 90.41% branches.\n- Exact packaged executable SHA-256: b68b5059f3b96a7dfa9d7f1cf14dd98ba8a8c58ef618b7bd224f303fda9e0364.\n- Canonical npm run acceptance:codex-tracer:macos: complete; all 16 checkpoints passed; cancellation 0 ms; cleanup 167 ms; first-visible p95 484 ms; local projection p95 0 ms; turn duration 7,375 ms.\n- Safeguards: zero accepted effects, effect-owner crossings, local/environment tools, repository bytes/context, unquarantined events, redaction matches, hidden retries, package hooks, and residual processes.\n- Evidence artifact SHA-256: b91efad210cc295b52f79ee5e506f17b977430b1891187fb6937dc9ac0238f9e.

@Niko4417

Niko4417 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: abc858c683

ℹ️ 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 native/crates/keiko-host-macos/src/workspace.rs Outdated
Comment thread native/crates/keiko-host-macos/src/runtime.rs
Comment thread quality/macos-accessibility-driver-source.mjs Outdated
Comment thread quality/codex-tracer-acceptance-io.mjs Outdated
Comment thread native/frontend/src/foundation.ts

@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: b032252f21

ℹ️ 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 native/crates/keiko-host-macos/src/runtime.rs Outdated
Comment thread native/crates/keiko-host-macos/src/runtime.rs
Comment thread quality/codex-tracer-acceptance-io.mjs Outdated
Comment thread native/crates/keiko-host-macos/src/runtime.rs Outdated
Comment thread quality/codex-tracer-acceptance-io.mjs Outdated
@Niko4417

Niko4417 commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 9a03be4c27

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

if (
change === null ||
typeof change !== "object" ||
!allowed.has(change.path) ||

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Bind evaluation to the delivered implementation head

Fresh evidence beyond the earlier ancestry thread is that the canonical evaluator still fails on this exact clean tree with evaluation-checkout-diff-invalid: the retained evaluationHead is efe722d..., while its real diff to the delivered head contains runtime, frontend, workflow, and quality changes that this allowlist rejects. The retained source digest is also stale (7bb83d... versus 8a1631... computed from the current six evaluator sources), so bypassing this check would only reach another evidence rejection. Re-run and bind the evaluation to the delivered evaluator source/head so the required command can authenticate the actual release tree.

AGENTS.md reference: AGENTS.md:L149-L153

Useful? React with 👍 / 👎.

path.ancestors().all(|ancestor| {
fs::symlink_metadata(ancestor).is_ok_and(|metadata| {
let mode = metadata.permissions().mode();
metadata.is_dir() && (mode & 0o022 == 0 || mode & 0o1000 != 0)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Verify ownership of writable sticky ancestors

When the configured Codex home or work root is below a group/world-writable sticky directory owned by another local account, this accepts the chain solely because the sticky bit is set. Fresh evidence beyond the earlier ancestor-chain fix is that a sticky directory's owner may still rename or delete other users' child entries, so that account can replace the already-validated home or work-root pathname before runtime use. Permit writable sticky ancestors only when their owner is trusted, such as root or the effective user, or hold descriptor-based ownership through launch.

AGENTS.md reference: AGENTS.md:L166-L167

Useful? React with 👍 / 👎.

let leaked_bytes = self
.repository_markers
.iter()
.map(|marker| count_byte_occurrences(&structural_bytes, marker) * marker.len())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid treating JSON field names as repository context

When the selected repository basename is also a protocol token—for example a valid repository named method—this raw substring scan finds that basename in the "method" key of the initialize frame, records a repository-context leak, and rejects the turn before submission even though no repository value was serialized. Fresh evidence beyond the earlier outbound-instrumentation thread is that markers are compared against all serialized keys and fixed values rather than only repository-origin data; track value provenance structurally so ordinary repository names such as method, params, or text cannot make every turn fail containment.

AGENTS.md reference: AGENTS.md:L162-L164

Useful? React with 👍 / 👎.

Comment thread quality/codex-tracer-accessibility.mjs Outdated
Comment on lines +235 to +238
const elapsedMs = Math.max(
0,
observed.elapsedMs - observationDriverBaselineMs,
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Measure projection latency without a single subtractive baseline

When the initial probe-start observation is a cold or otherwise slow adapter launch, subtracting that one duration from every later observation—and clamping negative results to zero—can make genuinely slow UI projections satisfy the 100 ms budget. For example, a 1,000 ms baseline makes each subsequent 900 ms observation record as 0 ms, and the evidence validator sees only this derived p95 rather than the raw delay. Measure action-to-observation latency directly, or use a bounded repeated baseline while also enforcing a raw observation ceiling.

AGENTS.md reference: AGENTS.md:L144-L146

Useful? React with 👍 / 👎.

@socket-security

socket-security Bot commented Aug 7, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn Medium
Recently published: npm nanoid published 5 days ago

Location: Package overview

From: native/frontend/package-lock.jsonnpm/vite@7.3.6npm/nanoid@3.3.18

ℹ Read more on: This package | This alert | What are recently published artifacts?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should either be allowlisted to allow recently-published versions, or an older version should be used instead.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/nanoid@3.3.18. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@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: 842cb6113b

ℹ️ 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 on lines +388 to +392
Self {
configuration,
active: Arc::new(ActiveRuntime::default()),
work_generation: Arc::new(AtomicU64::new(0)),
invalidated_workspace_generation: Arc::new(AtomicU64::new(0)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reconcile crash survivors before exposing the UI

When Keiko is forcibly terminated while Codex survives, the persisted .keiko-runtime-process record is consumed only by bind_configuration() during a later readiness check or turn; this startup constructor merely creates an empty ActiveRuntime. Consequently, relaunching and then remaining idle—or even quitting without another runtime request—never discovers or terminates the residual provider process, which can retain network activity and access to CODEX_HOME indefinitely. Fresh evidence beyond the earlier crash-survivor fix is that no startup path invokes recover_orphaned_runtime_directories; perform that reconciliation before renderer authority is exposed.

AGENTS.md reference: AGENTS.md:L101-L105

Useful? React with 👍 / 👎.

return true;
};
let _ = refresh_owned_processes(active);
signal_active_process_group(active, process_group, SIGTERM);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Authenticate retained process groups before signalling

When bounded cleanup expires after the direct child has exited but process inspection cannot prove the group is empty, child.try_wait() reaps the leader while ActiveRuntime retains only its numeric process-group ID. If that PID/PGID is reused before shutdown or workspace-change reconciliation, this unconditional TERM targets the new unrelated same-user group before any start-identity check, and the later escalation can send KILL as well. Fresh evidence beyond the earlier persisted-directory PID-reuse fix is that the in-memory retained group has no ProcessIdentity; retain and revalidate the leader identity before every group signal, and retire ownership without signalling when it has been reused.

AGENTS.md reference: AGENTS.md:L101-L105

Useful? React with 👍 / 👎.

Comment thread quality/codex-tracer-acceptance-io.mjs Outdated
Comment on lines +576 to +579
const content = await readFile(join(directory, child.name));
bytes += content.length;
digest.update("file\0", "utf8");
digest.update(content);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Stream and bound runtime-profile snapshots

When the human-provisioned CODEX_HOME contains a large file or a sufficiently large/deep directory tree, snapshotProtectedRuntimeProfile() reaches this code before and after the physical journey, and each file is loaded wholly into memory with no byte, entry, depth, or time limit. A valid accumulated profile can therefore exhaust memory or block the canonical acceptance indefinitely instead of returning a closed failure and completing fixture cleanup. Hash files incrementally and enforce explicit aggregate and traversal bounds before accepting the profile.

AGENTS.md reference: AGENTS.md:L162-L167

Useful? React with 👍 / 👎.

@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: 96188ecf42

ℹ️ 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 on lines +2025 to +2028
let name_bytes = if contextual_field || text.contains('/') {
name_marker
.map(|marker| count_byte_occurrences(bytes, marker) * marker.len())
.unwrap_or_default()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Stop matching basenames inside unrelated paths

When the selected repository basename also occurs in the disposable work path—for example, /Users/me/tmp with a work root below /private/tmp—this counts the basename in every string containing /. The subsequent thread/start serializes that unrelated work directory as cwd, so the audit rejects its own frame and every turn ends as containment-failed before task submission. Fresh evidence beyond the earlier protocol-token finding is that the structural fix still performs substring basename matching across all path-like values; compare provenance or the exact selected path instead.

AGENTS.md reference: AGENTS.md:L164-L164

Useful? React with 👍 / 👎.

Comment thread quality/codex-tracer-accessibility.mjs Outdated
Comment on lines +229 to +232
const project = async (action, observation, input) => {
await step(action, input);
const observed = await step(observation);
const elapsedMs = observed.elapsedMs;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include the action in projection latency

Fresh evidence after the subtractive-baseline fix is that project() still awaits the action completely before starting the observation and records only observed.elapsedMs. If the app takes 500 ms to render while the action adapter invocation is in flight, the subsequent observation can return immediately and record nearly zero, allowing the 100 ms p95 gate to pass despite slow user-visible projection. Start the measurement before the action and stop it after the checkpoint is observed.

AGENTS.md reference: AGENTS.md:L144-L146

Useful? React with 👍 / 👎.

Comment thread quality/codex-tracer-accessibility.mjs Outdated
"-o",
binary,
],
{ encoding: "utf8", shell: false },

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Bound the accessibility compiler subprocess

Fresh evidence beyond the earlier shared subprocess-runner fix is that the canonical physical journey invokes this separate spawnSync call and its options still omit a timeout. If xcrun or clang stalls, the synchronous call never returns, so the acceptance command cannot reach its closed rejection or fixture cleanup. Run this compilation through the bounded owned-process-group runner as well.

Useful? React with 👍 / 👎.

Comment on lines +124 to +127
presentWorkspace({
kind: "selecting",
generation: Math.max(1, workspaceState.generation + 1),
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the active turn when workspace reselection fails

When the user reselects a workspace during an active turn and runtime cancellation or cleanup cannot be proven, this optimistic generation change immediately clears both the runtime and turn projections. The host then rejects the workspace request without changing its old binding, but the catch path presents a generic unavailable workspace at the invented generation; the residual active or cleanup-failed turn becomes invisible and its cancellation control disappears. Delay clearing these projections until the host confirms the change, or restore and present the cleanup failure on rejection.

AGENTS.md reference: AGENTS.md:L144-L146

Useful? React with 👍 / 👎.

.is_none()
&& Instant::now() < wait_deadline
{
thread::sleep(Duration::from_millis(5));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Replace wall-clock polling in runtime tests

On a loaded macOS runner, these tests can exhaust their fixed two-second deadline before the spawned runtime receives CPU time and creates its marker, producing nondeterministic failures unrelated to the behavior under test; the same five-millisecond wall-clock polling pattern appears in the cancellation, shutdown, and workspace-change regressions. Synchronize through a condition, channel, or deterministic fixture hook instead of sleeping and racing the scheduler.

AGENTS.md reference: AGENTS.md:L170-L171

Useful? React with 👍 / 👎.

Comment thread quality/codex-tracer-acceptance-io.mjs Fixed
Niko4417 and others added 4 commits August 8, 2026 15:09
* test: stabilize readiness cleanup fixture (#101)

Replace the unbounded TERM-resistant busy loop with a blocking sleep loop so the fixture no longer competes for the scheduler inside the fixed 300 ms cleanup window. The TERM resistance, SIGKILL escalation, parent-reap marker, ownership retirement, and process-group assertions remain unchanged.

* test: synchronize cleanup fixture readiness (#101)

Emit the readiness handshake from the descendant only after it installs the TERM-resistant trap. This removes the fixture startup race while preserving the fixed cleanup deadline and the existing SIGKILL, parent-reap, ownership, and process-group assertions.

* test: remove cleanup fixture process churn (#101)

Block the synchronized TERM-resistant descendant in the shell's built-in read on a Rust-owned open pipe. This keeps one stable descendant for the fixed cleanup window instead of repeatedly spawning sleep children between ownership refresh and SIGKILL.

* test: bind cleanup fixture stdin explicitly (#101)

Explicitly redirect the background TERM-resistant shell from fd0 so POSIX non-interactive shell semantics cannot replace its piped stdin with /dev/null. The built-in read now blocks without CPU churn while preserving the fixed cleanup lifecycle proof.

* test: expose cleanup fixture failure flags (#101)

Classify the four existing cleanup predicates only when the fixture would fail, reconcile test-owned resources, and emit one bounded body-free K101 flag directly to stderr before exiting nonzero. Passing runs still execute every original assertion unchanged.

* test: streamline cleanup failure diagnostic (#101)

Emit the four existing cleanup predicates unconditionally to direct stderr before the unchanged assertions. This preserves the sanitized failure signal without adding failure-only cleanup branches or changing fixture semantics.

* test: satisfy cleanup diagnostic lint (#101)

* test: retain cleanup flags on failure (#101)

* test: move reap proof off cleanup critical path (#101)

* fix: reconcile stopped runtime cleanup (#101)

Reap the proven-stopped direct child and revalidate process-group and authenticated-owned absence before retiring ownership. Keep the fixed readiness budget focused on zero residue while proving descendant-first kill and parent wait semantics under a separate test-owned deadline.

* fix: authenticate cleanup retirement identity (#101)

Bind final reconciliation and retirement to the exact active process identity so a mismatched or reused process group cannot be reaped or cleared as success. Preserve retained ownership on failure and prove later recovery after an already-reaped group becomes absent.

* test: trace readiness cleanup reconciliation (#101)

Emit one bounded failure-only stage code from the flaky readiness cleanup proof so authoritative runners can distinguish deadline exhaustion, process observation, direct-child wait, and exact-identity retirement without exposing process identifiers or content.

* test: remove readiness cleanup diagnostics (#101)

Remove the temporary stage flags after the authoritative F001 capture confirmed readiness final-phase starvation. The signed diagnostic commit remains in history as bounded failure-first evidence.

* fix: preserve readiness reconciliation budget (#101)

Select an explicit readiness-only descendant phase that sends authenticated descendant KILL before proceeding directly to group KILL, reserving the remaining fixed 300 ms budget for zero-residue reconciliation. Turn cleanup and default parent-reap grace remain unchanged.
…#196)

* test: cover runtime boundary outcomes (#193)

* chore: compose atomic runtime bridge (#195)

@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

if output.quit {
app.exit(0);

P1 Badge Reconcile the runtime before executing in-app quit

When the always-available in-app quit button is pressed during a turn and runtime cleanup cannot be proven, this calls app.exit(0) directly; that reaches the non-preventable RunEvent::Exit branch, where cleanup failure is only logged before process termination. Fresh evidence beyond the earlier ExitRequested fix is that this command route never reaches the branch that calls api.prevent_exit(), so a residual Codex group can lose supervision; complete the guarded shutdown first or route the command through the preventable exit-request path.

AGENTS.md reference: AGENTS.md:L101-L105

ℹ️ 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 on lines +1729 to +1730
let Some(information) = process_information(runtime.process_id) else {
return true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Treat unavailable orphan inspection as a closed failure

When proc_pidinfo transiently fails for a still-running crash survivor, this returns true, causing recovery to delete the only runtime ownership record and proceed while the process group retains network access and CODEX_HOME. Fresh evidence beyond the earlier crash-survivor finding is that the new reconciliation path explicitly treats an unavailable second identity inspection as successful cleanup rather than distinguishing absence from inspection failure; preserve the record and fail closed unless process-group retirement is proven.

AGENTS.md reference: AGENTS.md:L101-L105

Useful? React with 👍 / 👎.

}

fn from_configuration(configuration: Option<RuntimeConfiguration>) -> Self {
let configuration = configuration.filter(reconcile_startup_configuration);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve recovery ownership after startup cleanup fails

When startup reconciliation returns false, such as when a live crash survivor cannot be killed within the cleanup timeout, Option::filter permanently discards the configuration while constructing an empty ActiveRuntime. Fresh evidence beyond the earlier startup-reconciliation finding is that later readiness requests and shutdown now have neither the work root nor an in-memory process identity with which to retry, so the surviving Codex group can remain active for the entire app session while shutdown reports success; retain a recovery-capable configuration/state and block or retry until settlement is proven.

AGENTS.md reference: AGENTS.md:L101-L105

Useful? React with 👍 / 👎.

Comment on lines +603 to +604
dispatchCancellation();
fail("codex-turn-failed");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep cancellation retryable after rejecting a channel update

When an invalid or out-of-order channel update is received and the first application_cancel dispatch is rejected or malformed, this fires cancellation asynchronously and immediately calls fail(), whose cleanup removes the retry hook; main.ts then clears the active controller and turn projection. Tauri still considers subsequent channel sends successful, so renderer-loss cancellation is not triggered and the runtime can continue until its 120-second timeout with no visible cancellation control; retain supervision until cancellation is acknowledged or a cleaned terminal arrives.

AGENTS.md reference: AGENTS.md:L101-L105

Useful? React with 👍 / 👎.

Comment on lines +1020 to +1022
if (previous.evidence.cleanupComplete) {
return JSON.stringify(previous) === JSON.stringify(next);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Accept lifecycle terminal rewrites after channel completion

When cancellation or the request deadline lands after turn_request emits its cleaned terminal channel view but before complete_turn_request() applies lifecycle precedence, the final response legitimately rewrites completed to cancelled or timed-out; this strict equality check rejects that authoritative response, after which main.ts clears the displayed turn. The user consequently loses the terminal summary and answer in this completion race, so allow the bounded same-identity lifecycle rewrite or emit the channel terminal only after final settlement.

AGENTS.md reference: AGENTS.md:L144-L146

Useful? React with 👍 / 👎.

…ming (#199)

* test(runtime): make request-deadline verification deterministic (#198)

* test(runtime): harden fixture publication failure (#198)

* test(runtime): bound fixture setup failures (#198)

* test(runtime): retain direct-child teardown proof (#198)

* test(runtime): authenticate direct-child finalization (#198)

* test(runtime): prove bounded child finalization (#198)

* test(runtime): cover request cleanup boundaries (#198)

* test(runtime): guard coverage fixture children (#198)

* test(runtime): isolate descendant tracking fixture (#198)

* test(runtime): serialize process fixture ownership (#198)

* test: clean verification fixtures (#198)

* test(foundation): clean up persisted state fixtures (#198)

* test(runtime): own failure fixtures (#198)

* test(runtime): verify request deadline composition (#198)

* test(runtime): stabilize deadline composition fixture (#198)
@sonarqubecloud

Copy link
Copy Markdown

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