Skip to content

Correct workspace projection acceptance boundary (#187) - #197

Closed
Niko4417 wants to merge 10 commits into
epic/98-codex-tracerfrom
codex/187-workspace-projection-recovery-602b
Closed

Correct workspace projection acceptance boundary (#187)#197
Niko4417 wants to merge 10 commits into
epic/98-codex-tracerfrom
codex/187-workspace-projection-recovery-602b

Conversation

@Niko4417

@Niko4417 Niko4417 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Scope

Issue #187 v3 readiness fingerprint: c66599671f59b04b27bac84263e5219c99e4e8458084a7213c84f4831a20b062.

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 a recorded Reuse Assessment, or the issue records why Existing Keiko evidence is not applicable.
  • 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.

No durable architecture change was required. The workspace runner is quality-only, reuses the accepted packaged-app and Accessibility primitives, measures successful projection after AX action return, retains native action separately, and never subtracts durations.

Acceptance criteria and evidence

Evidence identifies exact commands, artifacts, and platform results at the current head.

Acceptance criterion Evidence Exact head or artifact Result
AC1 Four exact-label successful projections after native action return: 29/32/32/49 ms; p95 49 ms (<=100). Native actions retained separately: 28/20/20/10 ms. Workspace evidence SHA-256 978c7447f8350ba5f6050d323ff4a234503abe24bc24ff287624721fa1f86fbf. 310f2a62eb220a22d7333717cb6bc9a9c4e18d9f Complete
AC2 Exact packaged journey passed launch, canvas, picker open, cancellation, permission denial, four distinct exact selections, and quit; schema keiko-native-codex-tracer-workspace-acceptance/v1; no product hook or duration subtraction. 310f2a62eb220a22d7333717cb6bc9a9c4e18d9f Complete
AC3 Twenty fresh packaged picker-cancellation launches retained independently; p95 498 ms (<=750). Malformed, stale, ambiguous, invalid-UTF-8, environment-drift, cleanup, package, and redaction states fail closed. 310f2a62eb220a22d7333717cb6bc9a9c4e18d9f Complete
AC4 Exact-head package acceptance, workspace evidence, focused suites, full green bar, zero-vulnerability audit, independent findings-zero audit, verify receipt SHA-256 555561fde31abbf7b22eb88a70330e897cd3c7f217fe0a9a32ca23766aae82f3, and audit receipt SHA-256 79ef54a467c93aa30873673e8bf3be3c436d76361f304965452a979b5588b26f complete. Full canonical intentionally not run because it remains #104-owned. 310f2a62eb220a22d7333717cb6bc9a9c4e18d9f Complete

Acceptance journey evidence

  • Applicability: Required
Journey and checkpoint Automated evidence and command Manual or platform evidence Result
J1.1 — packaged launch and canvas npm run acceptance:macos; node quality/codex-tracer-workspace-acceptance.mjs; checkpoints application-launch, canvas-presentation Exact signed/package-bound M4 macOS run at 310f2a62; package executable SHA-256 24ef95c3… Complete
J1.2 — picker open, cancellation, and denial Workspace runner checkpoints workspace-picker-open, workspace-picker-cancellation, workspace-permission-denial; 20 fresh cancellation launches, p95 498 ms Native system picker and permission boundary exercised through AXUIElement on AC/nominal reference Mac Complete
J1.3 — exact successful selection Four distinct sanitized fixtures; exact-label unique equality; projection samples 29/32/32/49 ms, p95 49 ms; native action separate Packaged application on M4/macOS 26.5.1, default 2x display, AC power, nominal thermal Complete
J1.4 — quit and cleanup Checkpoint application-quit; cleanup 71 ms; residue/mutations/redaction/repository bytes all 0 Zero Keiko app, adapter, inspector, or workspace-runner process residue Complete
  • 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 where this change crosses layers.
  • Applicable security, accessibility, performance, resource, visual, and platform evidence is attached or linked.
  • Excluded quality areas retain the rationale accepted in the issue.
  • Secrets, credentials, raw customer content, private endpoints, and PII are absent from source, tests, logs, evidence, artifacts, issues, and this pull request.

The runner reports no hidden retries, mock-only claims, package test hooks, raw path bytes, repository bytes, runtime repository context, redaction matches, residual processes, or unexpected workspace mutations.

Verification

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

Additional affected checks and concise results:

Exact head: 310f2a62eb220a22d7333717cb6bc9a9c4e18d9f
Issue #187 v3 fingerprint: c66599671f59b04b27bac84263e5219c99e4e8458084a7213c84f4831a20b062
Parent #98 v11 fingerprint: 12ed4a0225fdf1fac2a75731fdbb25e949cf61349cc0a7ab7d8bad09c0eab7a3
Focused workspace/Accessibility/acceptance suites: 62/62
npm run acceptance:macos: passed
node quality/codex-tracer-workspace-acceptance.mjs: complete
Workspace evidence schema: keiko-native-codex-tracer-workspace-acceptance/v1
Workspace evidence SHA-256: 978c7447f8350ba5f6050d323ff4a234503abe24bc24ff287624721fa1f86fbf
Package executable SHA-256: 24ef95c3c0ba987729cbbfaee100305cd7f713886ff80cacfcd36d11edeebed7
Package manifest SHA-256: 875d5119c0fd44b3f573c022b6fcde5777e42de5b777e6b4a96bb9ee66fe4197
Workspace projection: 29/32/32/49 ms; p95 49 ms (<=100)
Native action: 28/20/20/10 ms (separate)
Picker cancellation: 20 fresh launches; p95 498 ms (<=750)
Cleanup: 71 ms (<=5000); residual processes 0
Control coverage: 92.33% lines; 87.87% branches; 92.82% functions
Frontend: 56/56; native application: 20/20; host: 193/193; UI port: 13/13
npm audit --audit-level=high: 0 vulnerabilities
Verify receipt SHA-256: 555561fde31abbf7b22eb88a70330e897cd3c7f217fe0a9a32ca23766aae82f3
Audit receipt SHA-256: 79ef54a467c93aa30873673e8bf3be3c436d76361f304965452a979b5588b26f
git diff --check: passed

One earlier acceptance:macos invocation failed before Cargo/test execution because its PATH omitted Cargo (ENOENT). It produced no success evidence and was classified as invocation-only. The accepted run used the full pinned Node 24/npm 11.16/Cargo/Homebrew/system PATH and passed. A separate verify-receipt.sh --help probe failed closed under system npm 11.12.1 because that script has no help mode; it wrote no receipt. The corrected pinned invocation completed green and wrote the SHA-bound receipt.

The full npm run acceptance:codex-tracer:macos canonical was not rerun or claimed for #187 v3. The complete runtime/turn/cancellation journey remains owned by #104; #187 v3 authorizes the bounded workspace-only runner above.

Independent audit and findings

Confirmed finding Evidence Disposition Settlement evidence or follow-up
Successful combined invocation envelope omitted the accepted native-action plus projection phases Codex review at 602b298; failure-first timeout test Resolved Signed a2af734f; 15 s outer envelope only, with independent 5 s phase caps and <=100 ms retained projection budget
Reference environment was inspected only after timing Codex review at 602b298; environment-drift tests Resolved Signed a2af734f; normalized environment validated before first timing and after all measurements/cleanup
Four-argument invalid UTF-8 observation could be treated as omitted Codex review at 602b298; hostile adapter test Resolved Signed a2af734f; rejects before activation/action
Failure-only workspace diagnostics were insufficiently localized First exact runner failure plus hostile progress tests Resolved Signed f291318 and 310f2a6; one post-cleanup closed-enum stderr record, no raw error/path/PID/timing
Suggested replacing canonical #104 owner fingerprint with #187 Accepted #104 v7/#187 v3 ownership audit False positive Canonical fingerprint remains #104-owned; #187 v3 and #98 v11 bind the workspace evidence and PR delivery
  • 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: the exact packaged application plus AXUIElement workspace composition passed launch, canvas, picker open, cancellation, permission denial, four exact successful selections, quit, and owned cleanup at 310f2a62.
  • Machine-enforced acceptance result: workspace evidence complete; strict schema/budget/p95/binding/package/redaction/safeguard validator failures []; full local green bar and SHA-bound receipts complete.
  • macOS evidence: Apple M4/16 GiB/Mac16,1; macOS 26.5.1 build 25F80; built-in 3024×1964 display; logical 1512×982 default 2×; AC power; Low Power Mode off; nominal thermal.
  • Windows evidence: Not applicable — accepted issue targets packaged macOS arm64 workspace acceptance.
  • Manual usability, accessibility, visual, signing, or packaging evidence: package/source/executable/manifest bindings authenticated; exact semantic Accessibility checkpoints, permission denial, picker cancellation, success, quit, package exclusion, redaction, and zero residue passed.

Delivery

  • Target path: child issue -> epic branch
  • 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.
  • 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.
  • A draft pull request was not promoted to Ready for Human Review before every required Acceptance Journey result and exact-head gate was complete.

For a child-issue pull request targeting its designated epic branch:

  • The accepted issue authorizes this epic-branch target.
  • Acceptance and audit evidence is complete, every applicable exact-head gate is green, and no blocking finding or review conversation remains.

This authority exists only for a fully eligible child-issue pull request targeting its exact accepted epic/** branch. PR #197 remains draft while fresh remote checks and review settle; no merge is being attempted.

PR #190 was closed unmerged because its delivery branch had an authenticated prohibited force update. Its branch remains available for transparent history. PR #197 is the sole active delivery PR. The recovery branch was created at unchanged signed 602b298…; this publication was one ordinary fast-forward push 602b298…310f2a62. No force push, rewrite, gate bypass, or evidence substitution occurred on this branch.

For an epic or standalone pull request targeting dev, complete only by Niko or Oscharko. This child PR does not target dev; the human-only subsection is not applicable.

Residual risks and follow-ups

Closes #187

@Niko4417

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: 602b298c69

ℹ️ 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 quality/codex-tracer-acceptance.mjs
Comment thread quality/codex-tracer-accessibility.mjs Outdated
Comment thread quality/codex-tracer-acceptance-io.mjs Outdated
Comment thread quality/codex-tracer-accessibility-source.mjs
@Niko4417

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: 310f2a62eb

ℹ️ 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 (!REVISION_PATTERN.test(sourceRevision))
throw new Error("acceptance-source-revision-invalid");
const inspected = await inspectPackage(sourceRevision);

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 Validate the existing package's complete file tree

When this workspace-only runner is invoked against a current-head package that acquired an extra file after packaging, prepareWorkspacePackage still accepts it: unlike preparePackage, it does not rebuild via packageAcceptance, and inspectPackage reads only the manifest, foundation evidence, and executable without enumerating the actual package tree. The resulting evidence can therefore claim unexpectedFiles: 0 and packageTestHooks: 0 for a package that contains an unmanifested hook or other unexpected resource; rebuild the package or compare its complete tree with the manifest before launching it.

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

Useful? React with 👍 / 👎.

Comment on lines +1321 to +1323
Promise.all(
prepared.internal.workspaceRoots.map((root) => snapshotDirectory(root)),
),

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 denied workspace in mutation evidence

When the permission-denial scenario accidentally changes the denied fixture—for example, the packaged app chmods or writes it under the same user—the safeguard still reports unexpectedWorkspaceMutations: 0: the before/after snapshots cover only runtimeWorkRoot and the four successful workspaceRoots, while deniedWorkspaceRoot is omitted and later reset and deleted during cleanup. Capture mutation evidence for the denied fixture as well so the permission-denial checkpoint cannot conceal filesystem effects.

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

Useful? React with 👍 / 👎.

Comment on lines +1379 to +1383
const result = await waitForTracerAccessibilityAction({
...request,
binary: resources.adapter.binary,
pid: child.pid,
});

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 Do not retry paired activating actions

When a paired adapter invocation performs its action but cannot observe the projection before returning missing-or-ambiguous-semantic-target, this call goes through waitForTracerAccessibilityAction, whose retry loop invokes the entire activating action again rather than retrying only observation. That can press canvas navigation, picker cancellation, workspace selection, or turn cancellation multiple times and then retain timing from a later attempt, even though the emitted safeguard unconditionally claims hiddenRetries: 0; execute each activating action once or distinguish post-action observation failures so they cannot re-enter the action.

AGENTS.md reference: AGENTS.md:L162-L165

Useful? React with 👍 / 👎.

Comment on lines +1516 to +1519
const sourceRevision = await run(
"git",
hardenedGitArguments(["rev-parse", "HEAD"]),
{ timeoutMs: acceptanceSubprocessTimeouts.inspection },

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 the runner itself to a clean exact-head worktree

When tracked or untracked quality files are modified locally, this runner executes those uncommitted harness changes while recording only git rev-parse HEAD; unlike the native package gate, it never applies the repository's exact-head guard or checks git status before and after execution. A modified validator or adapter can therefore emit apparently exact-head workspace evidence for code that is not contained in the recorded revision. Require a clean exact-head guard for the entire run, including a final unchanged check before evidence is persisted.

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

Useful? React with 👍 / 👎.

@Niko4417

Copy link
Copy Markdown
Collaborator Author

Stopped and superseded by the accepted runtime-verification blocker #198; this PR is being closed unmerged and its branches are preserved.

Exact stopped delivery evidence:

  • PR head: 310f2a62eb220a22d7333717cb6bc9a9c4e18d9f
  • CI run: 31430749001, attempt 1
  • macOS 14 job 93593303001: failed only runtime::tests::request_timeout_is_one_end_to_end_initialization_and_cleanup_deadline during native:coverage; bounded sanitized job-log SHA-256 75e731468b1fd5837421ddb08f8459e141188607ec9a8ff8e1744fd7cb381470
  • macOS 26 job 93593303020: passed the same-head coverage step and completed green through acceptance:macos
  • No failed job was retried and no failure is reclassified as success.

The four fresh Codex review findings remain unresolved and are retained for the future fresh #187 replay after #198 merges:

#198 v1 is the official blocker and is implementation-ready under #198 (comment) (f28ee14030bb4eca70957156882fcdaf962d25a8834bf01c65f9e74ad8a0d6be). Parent #98 v12 readiness: #98 (comment) (34dbd177768908f136da46d7a270e9ac1341917ccb43b1abd080811e2fadd7d3).

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