From 51a7750ffa218bf40dfa51d3f6a30c2a917544ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=20Alexander=20=F0=9F=91=91?= Date: Thu, 12 Nov 2026 14:43:17 -0600 Subject: [PATCH 1/4] test: cover Code Review revocation and unsafe context paths Verify ready-to-denied reads, later offline fallback and a held context response through real Electron IPC. Add a direct unsafe-path boundary case and retain all initial failures, the controlled negative result and exact qualification limits. --- .../e2e/code-review-regressions.spec.ts | 113 +++++++++++++++++- .../test/fixtures/code-review-gh-world.ts | 6 + .../2026-11-12-cr8-access-revocation.md | 56 +++++++++ docs/status.md | 1 + .../plans/2026-11-12-cr8-access-revocation.md | 69 +++++++++++ ...2026-11-12-cr8-access-revocation-design.md | 19 +++ 6 files changed, 263 insertions(+), 1 deletion(-) create mode 100644 docs/reviews/2026-11-12-cr8-access-revocation.md create mode 100644 docs/superpowers/plans/2026-11-12-cr8-access-revocation.md create mode 100644 docs/superpowers/specs/2026-11-12-cr8-access-revocation-design.md diff --git a/apps/desktop/e2e/code-review-regressions.spec.ts b/apps/desktop/e2e/code-review-regressions.spec.ts index b49c2a16..895fb739 100644 --- a/apps/desktop/e2e/code-review-regressions.spec.ts +++ b/apps/desktop/e2e/code-review-regressions.spec.ts @@ -5,7 +5,7 @@ import path from "node:path"; import { tid } from "./support.js"; import { baseWorld, FIELD_GUIDE, fitWindow, launchWithGh, LENDING, prRow, READ_ENDPOINT, settle, type Harness } from "./code-review-support.js"; import { ghFile, ghPull, ghRepo, ghRow, sha } from "../test/fixtures/code-review-gh-world.js"; -import type { CodeReviewReply, CodeReviewRequest, Inbox, PrKey, PrOverview } from "../src/shared/code-review.js"; +import type { CodeReviewReply, CodeReviewRequest, Inbox, PrKey, PrOverview, PrRevision } from "../src/shared/code-review.js"; /** * CR-8 (#327) cross-slice regressions: the CR-3 renderer over CR-2's production read service, in real Electron, @@ -165,6 +165,117 @@ test("incomplete data: a timed-out search, a hidden repository, a short files li expect(JSON.stringify(files)).not.toContain("SENTINEL"); }); +function revocationWorld() { + const world = baseWorld(); + world.routes["repos/example-org/lending/pulls/73"] = ghPull(LENDING, 73, "Private review", { body: "CR_REVOKED_PRIVATE_BODY", files: 1 }); + world.routes["repos/example-org/lending/pulls/73/files"] = [ghFile("src/private.ts", "@@ -1 +1 @@\n-before\n+CR_REVOKED_PATCH", 1, 1)]; + world.routes["repos/example-org/lending/contents/src/private.ts"] = { status: 200, raw: "CR_REVOKED_CONTEXT\n" }; + world.routes["repos/example-org/lending/issues/73/timeline"] = []; + world.routes["repos/example-org/lending/deployments"] = []; + world.routes[`repos/example-org/lending/commits/${sha("c")}/check-runs`] = { total_count: 0, check_runs: [] }; + world.routes[`repos/example-org/lending/commits/${sha("c")}/status`] = { total_count: 0, statuses: [] }; + return world; +} + +function revocationReads(key: PrKey, revision: PrRevision): CodeReviewRequest[] { + return [ + { op: "overview", requestId: "revoke-overview", key }, + { op: "resolve", requestId: "revoke-resolve", input: "https://github.com/example-org/lending/pull/73" }, + { op: "context", requestId: "revoke-context", key, revision, side: "head", path: "src/private.ts", start: 1, end: 1 }, + { op: "activity", requestId: "revoke-activity", key, cursor: null }, + { op: "checks", requestId: "revoke-checks", key, revision }, + { op: "files", requestId: "revoke-files", key, revision, cursor: null }, + ]; +} + +for (const status of [403, 404, 410]) test(`revoked access ${status}: an accessible PR never returns kept private reads after denial and a network failure`, async () => { + h = await launchWithGh(revocationWorld()); + const { page } = h; + await tid(page, "rail-code-review").click(); + await prRow(page, "example-org/lending#73").click(); + await expect(tid(page, "code-review-overview-body")).toContainText("CR_REVOKED_PRIVATE_BODY"); + const key = await keyOf("example-org/lending#73"); + const overview = await invoke({ op: "overview", requestId: "revoke-initial", key }); + if (overview.result.state !== "ready") throw new Error("accessible overview not ready"); + const revision = (overview.result.value as PrOverview).revision; + const reads = revocationReads(key, revision); + for (const request of reads) expect((await invoke(request)).result.state, request.op).toBe("ready"); + const other = await keyOf("example-org/field-guide#73"); + const otherRead: CodeReviewRequest = { op: "overview", requestId: "revoke-unrelated", key: other }; + expect((await invoke(otherRead)).result.state).toBe("ready"); + // Positive control: a failed network read really reaches main's same-account kept-answer path. + h.world((w) => { w.offline = true; }); + expect((await invoke(otherRead)).result).toMatchObject({ state: "stale", reason: "offline" }); + h.world((w) => { + w.offline = false; + w.routes["repos/example-org/lending/pulls/73"] = { status, body: { message: "No longer accessible" }, stderr: "gh: ghp_REVOKED_DIAGNOSTIC_SENTINEL denied\n" }; + }); + await tid(page, "code-review-inbox-menu").click(); + await tid(page, "code-review-refresh").click(); + await expect(tid(page, "code-review-overview-error")).toBeVisible(); + await expect(tid(page, "code-review-overview-body")).not.toContainText("CR_REVOKED_PRIVATE_BODY"); + h.world((w) => { w.offline = true; }); + for (const request of reads) { + const denied = await invoke(request); + expect(denied.result.state, request.op).toBe("unavailable"); + expect(JSON.stringify(denied), request.op).not.toMatch(/CR_REVOKED_(PRIVATE_BODY|CONTEXT|PATCH)|REVOKED_DIAGNOSTIC_SENTINEL/); + } + expect((await invoke(otherRead)).result).toMatchObject({ state: "stale", reason: "offline" }); + await tid(page, "code-review-overview-error").getByRole("button", { name: "Retry" }).click(); + await expect(tid(page, "code-review-overview-error")).toContainText("Check the network connection"); + await expect(tid(page, "code-review-overview-body")).not.toContainText("CR_REVOKED_PRIVATE_BODY"); + expect(await page.content()).not.toContain("REVOKED_DIAGNOSTIC_SENTINEL"); + expect(h.providerStarts()).toEqual([]); + expect(h.posts()).toEqual([]); + expect(h.calls().filter((call) => /^(POST|PUT|PATCH|DELETE) /.test(call))).toEqual([]); +}); + +test("revoked access: a held private context response cannot return after the accessible PR is denied", async () => { + h = await launchWithGh(revocationWorld()); + const key = await keyOf("example-org/lending#73"); + const overview = await invoke({ op: "overview", requestId: "held-revoke-overview", key }); + if (overview.result.state !== "ready") throw new Error("accessible overview not ready"); + const revision = (overview.result.value as PrOverview).revision; + const request: CodeReviewRequest = { op: "context", requestId: "held-revoke-context", key, revision, side: "head", path: "src/private.ts", start: 1, end: 1 }; + const content = "repos/example-org/lending/contents/src/private.ts"; + h.world((w) => { w.holds = { [content]: "private-context" }; }); + const during = invoke(request); + await expect.poll(() => h.calls().filter((call) => call.startsWith(content + "?")).length).toBe(1); + h.world((w) => { w.routes["repos/example-org/lending/pulls/73"] = { status: 403, body: { message: "No longer accessible" }, stderr: "gh: ghp_REVOKED_DIAGNOSTIC_SENTINEL denied\n" }; }); + const denial = await invoke({ op: "overview", requestId: "held-revoke-denial", key }); + expect(denial.result).toMatchObject({ state: "unavailable", reason: "denied" }); + h.release("private-context"); + const late = await during; + expect(late.result).toMatchObject({ state: "unavailable", reason: "denied" }); + expect(JSON.stringify([denial, late])).not.toMatch(/CR_REVOKED_(PRIVATE_BODY|CONTEXT)|REVOKED_DIAGNOSTIC_SENTINEL/); + h.world((w) => { w.offline = true; }); + const after = await invoke({ ...request, requestId: "held-revoke-offline" }); + expect(after.result.state).toBe("unavailable"); + expect(JSON.stringify(after)).not.toContain("CR_REVOKED_CONTEXT"); + expect(await h.page.content()).not.toContain("REVOKED_DIAGNOSTIC_SENTINEL"); + expect(h.providerStarts()).toEqual([]); + expect(h.posts()).toEqual([]); + expect(h.calls().filter((call) => /^(POST|PUT|PATCH|DELETE) /.test(call))).toEqual([]); +}); + +test("unsafe context paths: Electron IPC refuses traversal and disguised paths before starting a GitHub read", async () => { + h = await launchWithGh(revocationWorld()); + const key = await keyOf("example-org/lending#73"); + const overview = await invoke({ op: "overview", requestId: "unsafe-path-overview", key }); + if (overview.result.state !== "ready") throw new Error("accessible overview not ready"); + const revision = (overview.result.value as PrOverview).revision; + // A valid context proves the real handler is active before testing its input boundary. + const request: CodeReviewRequest = { op: "context", requestId: "unsafe-path-context", key, revision, side: "head", path: "src/private.ts", start: 1, end: 1 }; + expect((await invoke(request)).result).toMatchObject({ state: "ready", value: { lines: ["CR_REVOKED_CONTEXT"] } }); + const before = h.calls(); + for (const path of ["/etc/passwd", "docs/../../secrets", "./src/private.ts", "src//private.ts", "src/a\u0000b", "src/\u202eprivate.ts", "src/pri\u200dvate.ts", "src/\ud800.ts"]) { + await expect(invoke({ ...request, path })).rejects.toThrow(/Invalid Code Review request/); + } + expect(h.calls()).toEqual(before); + expect(h.providerStarts()).toEqual([]); + expect(h.posts()).toEqual([]); +}); + test("hostile content: PR text renders inert, and unsafe or look-alike links never resolve, open or navigate", async () => { const world = baseWorld(); const hostile = ` Fix ‮gnp.exe‬ [x](javascript:alert(1))`; diff --git a/apps/desktop/test/fixtures/code-review-gh-world.ts b/apps/desktop/test/fixtures/code-review-gh-world.ts index 3d9d8ab1..3a6d52b0 100644 --- a/apps/desktop/test/fixtures/code-review-gh-world.ts +++ b/apps/desktop/test/fixtures/code-review-gh-world.ts @@ -10,6 +10,8 @@ // (PUT …/pulls/N/merge) is recorded the same way, and the PR then reads as merged by the account; // so are a PATCH of the PR, a reviewer request and the two draft mutations, which the PR then shows. export interface GhWorld { + /** Fail API reads as network failures while retaining the same synthetic signed-in identity. */ + offline?: boolean; /** `gh api user`; null answers as gh does when nobody is signed in (exit 4). */ user: { id: number; login: string } | null; /** Search rows per group, before the person's text and paging narrow them. */ @@ -44,6 +46,10 @@ const read = () => JSON.parse(fs.readFileSync(process.env.FAKE_GH_WORLD, "utf8") const wait = (hold) => { const released = hold && require("node:path").join(process.env.FAKE_GH_HOLDS, hold); if (released) { const flag = new Int32Array(new SharedArrayBuffer(4)); while (!fs.existsSync(released)) Atomics.wait(flag, 0, 0, 25); } }; wait((read().holds || {})[route]); const world = read(); +if (world.offline && method === "GET" && route !== "user") { + process.stderr.write("dial tcp: network is unreachable\n"); + process.exit(1); +} const postsFile = process.env.FAKE_GH_POSTS; const posts = () => postsFile && fs.existsSync(postsFile) ? fs.readFileSync(postsFile, "utf8").split("\n").filter(Boolean).map((l) => JSON.parse(l)) : []; const reason = { 200: "OK", 403: "Forbidden", 404: "Not Found", 405: "Method Not Allowed", 409: "Conflict", 410: "Gone" }; diff --git a/docs/reviews/2026-11-12-cr8-access-revocation.md b/docs/reviews/2026-11-12-cr8-access-revocation.md new file mode 100644 index 00000000..722d31e0 --- /dev/null +++ b/docs/reviews/2026-11-12-cr8-access-revocation.md @@ -0,0 +1,56 @@ +# CR-8 accessible-to-revoked integration evidence + +## Requirement and boundary + +The full #327 adversarial step includes revoked access, unsafe paths and no secret leakage. Existing service units covered revocation, but the Electron inaccessible-repository case began with access already denied. This slice adds the accessible-to-revoked transition and a direct unsafe context-path IPC case through the production renderer/preload/IPC/read service/gh transport. Only the external gh executable is synthetic; no IPC handler is replaced. + +The development app uses a private synthetic profile, repository and gh configuration. CLI provider recorders verify zero provider starts; mutation logs and method records verify zero writes. No personal account, real token, live inference, GitHub mutation, installed-release or human/device acceptance is exercised. The full #327 criterion remains unchecked pending the complete clause audit and actual protected delivery. + +## Source and environment + +The source base is protected main `30a56557cb09512396a7d0334bd1046cf0fba609`. There is no permanent application-code change. The temporary negative-control mutation was restored byte-for-byte before clean validation. Test source identities are: + +- `apps/desktop/e2e/code-review-regressions.spec.ts`: SHA-256 `53b9d30be948ad542cfa0092f285752c2dda76c790b6fbc8e3519859af721c06`. +- `apps/desktop/test/fixtures/code-review-gh-world.ts`: SHA-256 `66bd389996fafea154bc2c2f351d245d99fb6dbf974b0e65da580096f1f7c5f1`. + +The host is macOS 27.2.1 arm64, Node 24.22.0 and pinned pnpm 10.34.5. The installed Electron package is 44.4.5; tests use its development-app launch with no packaged-app override. Package identity is distinct from a separate installed-release acceptance claim. + +## Cases and first failures + +The original nine regression cases passed in 19.5 seconds after a fresh build. The immediately preceding full-unit baseline is reusable because comparison with qualified `435721d` differs only in two human documentation files; all runtime/build/test/dependency inputs are identical. The fresh final qualification below supersedes that baseline for this slice. + +For each 403, 404 and 410 case, the visible private body and six overview/resolve/context/activity/checks/files reads begin ready. A different repository first demonstrates a real stale/offline fallback under the same synthetic identity. The real inbox Refresh then observes revocation, hides the private body and shows an error. Later offline reads must all remain unavailable for the revoked PR, while the unrelated repository retains its legitimate fallback. Retry waits for the actual network failure rather than merely the previous denial notice. Synthetic CLI diagnostics do not appear in replies or rendered content. + +The fourth case holds a real context transport response, observes a denial through a separate overview read, releases the held response and requires it to remain unavailable without the private payload. These are actual Electron/IPC transitions over a scripted external CLI, not live GitHub permission changes. + +Before the new fixture branch existed, the offline positive control failed in all three table cases: the response was ready instead of stale/offline. The held-response case already passed. This first RED and its traces are retained; it is evidence of a missing test-fixture capability, not a demonstrated product bug. Adding optional `GhWorld.offline` made the four focused revocation cases pass in 9.9 seconds, leaving default fixture behavior unchanged. + +A deliberate temporary production mutation classified ordinary 403 as offline. The 403 integration case failed because the private body remained visible and no denial notice appeared. Its trace and source backup are retained. Restoring the exact original production bytes, rebuilding main and running the whole regression file passed thirteen cases in 31.9 seconds. This proves test sensitivity; no production repair is claimed. + +A further clause audit identified unsafe context paths as a second integration gap. The fifth case proves one real valid context read, then asks the real IPC handler for literal absolute, parent-traversal, dot/empty-segment, control, bidi, zero-width and lone-surrogate paths. Each must reject before an additional gh call; provider starts and mutations stay zero. The focused unsafe-path case passed in 2.0 seconds, with eight rejected path inputs and no further gh calls. The final full E2E run also passes this case. + +## Reproduction and qualification + +```sh +pnpm install --frozen-lockfile +pnpm build +pnpm --filter @modex/desktop exec playwright test e2e/code-review-regressions.spec.ts --retries=0 +pnpm typecheck +pnpm test +pnpm test:e2e +``` + +Fresh build, typecheck and full units passed: 2,570 unit passes, 36 explicit skips and zero failures/cancellations. The added path case changed only E2E inputs, and the qualification driver stopped at its source-freeze guard before E2E. Reconstructing the exact pre-addition source patch reproduced its recorded SHA-256, independently proving every non-E2E runtime/build/typecheck/unit/dependency producer unchanged. Those passed stages remain valid. Final full E2E passed on the unchanged five-case source snapshot: 525 desktop cases with eleven explicit skips in 22.1 minutes, eight site cases in 7.8 seconds and four web cases in 2.6 seconds. All fourteen cases in the modified regression file passed; no framework retry markers were observed. The eleven skips are four live-provider cases, four native local-model cases and three Open Knowledge opt-in cases; they are not acceptance passes. Independent review, hosted source checks and protected delivery remain pending. + +## Acceptance limits + +These fixtures establish bounded no-fallback/no-late-payload and IPC-validation behavior under named synthetic failures. They do not prove live provider quality, a real GitHub revocation, real-write canaries, human accessibility, physical-device behavior, a fresh release candidate or the entire adversarial clause. Code Review stays hidden by default and no release or execution-admission policy changes. + +The complete local logs are retained privately with these SHA-256 identities: + +| Command | Raw log SHA-256 | +| --- | --- | +| `pnpm build` | `26603cc8baa6abf4da8709d44e73eaa6f9caecc9c13c7218e27d7a668b9db4f6` | +| `pnpm typecheck` | `5a4f48927c40e455183c8d566825aecafa1e3f2c6ae89f4d0d142a6852bdd80c` | +| `pnpm test` | `165404057e24c511e8885c48ca785c8fda9792ceb9c3b608de741be4b41b96be` | +| `pnpm test:e2e` | `d68960f12a9f3c1412ba79fca0f2619aca055fdd5b8f104eb6153b857cf156b6` | diff --git a/docs/status.md b/docs/status.md index f6d84712..ea194c8d 100644 --- a/docs/status.md +++ b/docs/status.md @@ -159,6 +159,7 @@ before relying on a tick. - **Local draft destination fence** (#380, #381, #498). Final review found that an asynchronous local selection could accept input/send through its old non-local configuration before the target was pinned. Two controlled regressions failed; the repair reserves and fences only the source/new target, preserves the exact raw draft, and leaves unrelated Stop and editing available. All three focused Electron cases and full frozen build/typechecks/units pass (2,465 unit passes, 36 skips), followed by 511 desktop E2E passes with 11 skips and seven site passes. Fresh hosted qualification and protected delivery remain required. Product local execution remains unadmitted. [Failure, repair and limits](reviews/2026-11-11-local-selection-fence.md). - **iPhone image-binding diagnostics** (#109, #498). The prior manifest collapsed container-query failures, realpath failures and image mismatches into app-image refusals. A diagnostic-only increment retains at most 16 callback/time-bound outcomes with sanitized error metadata and unchanged identity/command/stop guards. Six baseline controls fail; all 25 observer cases pass after the change. Full frozen build/typechecks/units pass with 2,471 passes, 36 skips and zero failures/cancellations. Fresh hosted observation remains required; no successful stack binding or older TLS cause is claimed. [Evidence and limits](reviews/2026-11-11-ios-image-binding-diagnostics.md). - **iPhone trust observer collection** (#498). Published `188af74` passed 44 iPhone tests with zero actual failures, but its observer stopped after six poll errors and unconfirmed command closure, with no callbacks/stacks captured. A predicate-only experiment narrows app/Security and trustd-peer logs while keeping every bound and identity guard. Native Foundation predicate replay goes from output-limit failure to 21 selected records with preserved app/trustd correlation; all 19 focused tests pass. Full build/typechecks and units passed with 2,465 passes, 36 skips and zero failures/cancellations. Fresh `aa095b2` app qualification passes 44 tests, but nine image-binding refusal entries yielded zero bound observers/stacks; five distinct callbacks in offline diagnostics completed normally. Live stack binding remains unqualified and the older trust-stall cause remains unknown. [Evidence and limits](reviews/2026-11-11-ios-trust-predicate.md). +- **Code Review revocation integration evidence** (#327). An owned candidate adds actual Electron/IPC accessible-to-revoked cases for 403/404/410, a held context response and an unsafe context-path boundary. Four focused revocation cases pass; a deliberate temporary 403-as-offline mutation fails with the private body still visible, and the exact restored production source passes all thirteen then-current regressions. The path case also passes, and fresh build/typechecks plus 2,570 units with 36 explicit skips pass. Full E2E passes 525 desktop cases with eleven explicit opt-in skips, eight site cases and four web cases, including all fourteen regressions. Independent review and protected delivery remain pending; no full adversarial, live-provider, real-write or human acceptance is claimed. [Evidence and limits](reviews/2026-11-12-cr8-access-revocation.md). - **Code Review native-modal investigation** (#498). Parent `fc593e0` timed out clicking Settings before Jev contrast collection; teardown then timed out and the job reached its 45-minute limit. The retained Electron stack is inside `NSAlert runModal`, with dialog message and cause unknown. A test-only candidate records bounded owned-child stderr and observes uncaught exceptions without handling them; five real-child controls and all eight accessibility cases pass locally. Full build/typechecks and units passed with 2,460 passes, 36 skips and zero failures/cancellations. Exact-head hosted qualification remains required; no causal repair or acceptance is claimed. [Observation and limits](reviews/2026-11-11-electron-modal-observation.md). - **Linux Debian source continuity** (#498). Candidate `188af74` acquired all four signed Noble pockets and installed host dependencies, then failed baseline Debian installation because `libnotify4` was not installable. The next candidate keeps explicit signed sources through both baseline and upgrade dependency resolution, preserving artifact verification, installed checks and the three-minute direct command bound. All 13 synthetic helper/wrapper cases and final corrected-source build/typechecks/units pass, with 2,465 passes, 36 skips and zero failures/cancellations. Fresh `aa095b2` hosted installed checks now pass eight Linux launches plus controlled KWallet5 and three Windows NSIS/DPAPI launches; original installer acceptance remains pending, including historical-schema, full graphical-login and real-account limits. [Failure, candidate and limits](reviews/2026-11-11-linux-debian-sources.md). - **Linux qualification host preparation** (#498). Candidate `5edbb84` passed required hosted macOS, iPhone and Windows checks, but both Linux attempts stopped at the 30-minute job limit during Azure Ubuntu mirror DNS failures before installed-app acceptance. The CI-only repair selects official signed Noble archive/security sources per APT invocation, bounds acquisition and the host step, and preserves the nine packages and downstream installed acceptance. Build passed; final full units passed with 2,427 passes, 35 skips and zero failures. Seven focused helper cases and independent review cover argument boundaries, failure propagation and owned temporary cleanup. Application/native inputs are unchanged. Fresh exact-head hosted qualification remains required; no Linux acceptance or product admission is claimed. [Failure evidence, repair and limits](reviews/2026-11-11-linux-host-preparation.md). diff --git a/docs/superpowers/plans/2026-11-12-cr8-access-revocation.md b/docs/superpowers/plans/2026-11-12-cr8-access-revocation.md new file mode 100644 index 00000000..5cbfefe4 --- /dev/null +++ b/docs/superpowers/plans/2026-11-12-cr8-access-revocation.md @@ -0,0 +1,69 @@ +# CR-8 access revocation Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Prove accessible-to-revoked reads and unsafe context-path refusal through Electron, including later offline fallback and a held context response. + +**Architecture:** Extend the existing synthetic gh boundary with opt-in network failure and exercise the real renderer/IPC/read service. Production behavior is unchanged unless the new tests demonstrate a defect. + +**Tech Stack:** pinned pnpm 10.34.5, TypeScript, Electron, Playwright, existing WORLD_GH fixture. + +**Spec:** docs/superpowers/specs/2026-11-12-cr8-access-revocation-design.md + +## Global Constraints + +- Main is protected; use this session-owned helper-created worktree and signed commits. +- Keep synthetic gh identity stable; no real inference, token, GitHub write, policy/default/release change or owner-worktree adoption. +- All rendered prose paragraphs occupy one source line; preserve first failures, skips and exact source identities. +- Full #327 acceptance requires all clauses and protected delivery, not this slice alone. + +## Review Focus + +- A forbidden/not-found/gone answer must invalidate the affected PR across all six read variants; table cases cover 403/404/410. +- A delayed context response must not restore content after denial; the held-response case covers this. +- Revocation must not erase another repository's same-account offline fallback; each table case covers the unrelated PR. +- Diagnostics must not enter the renderer or replies, and reads must start no provider or mutation; every case checks these effects. +- Unsafe context paths must be refused by the actual IPC handler before transport; the path case includes one valid positive control and eight malformed inputs. + +### Task 1: Integrated revocation transitions + +**Files:** +- Modify: `apps/desktop/e2e/code-review-regressions.spec.ts` +- Modify: `apps/desktop/test/fixtures/code-review-gh-world.ts` +- Create: `docs/reviews/2026-11-12-cr8-access-revocation.md` +- Modify: `docs/status.md` + +**Interfaces:** +- Consumes: existing `launchWithGh`, `Harness.world`, `Harness.release`, production `code-review:read`, `CodeReviewRequest` and `CodeReviewReply`. +- Produces: optional `GhWorld.offline?: boolean`, default false; five integration cases proving the contract. No new production interface. + +- [x] **Step 1: Establish baseline.** Run helper check and fresh build; verify all non-document tracked inputs match the just-qualified main514 baseline (2,570 unit passes, 36 skips), then run the original regression file. + +Run: `pnpm build` and `pnpm --filter @modex/desktop exec playwright test e2e/code-review-regressions.spec.ts`. +Expected: both terminal zero; all original regression cases pass. + +- [x] **Step 2: Add tests first.** For each status 403/404/410, prime a visible synthetic private body plus ready overview/resolve/context/activity/checks/files reads, prime field-guide#73, check that offline mode yields its stale/offline fallback, restore network, revoke the lending PR, use the real inbox Refresh action, require an error and absent private body, then require every revoked sibling read unavailable during offline mode. Add a held context case: begin a real context read, observe its gh request, revoke via overview, release it and require unavailable with no private payload. Assert no provider starts, no writes and no leaked synthetic diagnostic marker. + +Run: focused `playwright test ... --grep 'revoked access' --retries=0`. +Expected: first failure at the offline positive control while the requested fixture capability is absent; preserve this RED, not a production-defect claim. + +- [x] **Step 3: Add the fixture capability.** Add `offline?: boolean` to GhWorld; after reading the world, API requests other than `user` log normally, print a fixed network diagnostic and exit 1 before any HTTP answer when offline. Existing behavior remains the default. Run the four focused revocation cases; investigate any genuine product failure with systematic debugging before repair. + +Expected: four passes on the real Electron/IPC service; a product failure remains open until reproduced and repaired. + +- [x] **Step 4: Prove test sensitivity.** Preserve exact production bytes, temporarily map ordinary 403 to offline in `httpFailure`, rebuild desktop main and run only the 403 case. Require a failure from stale/visible private content instead of unavailability. Restore the exact original bytes even on failure, rebuild and run the full regression file. Save mutation, RED and restored GREEN identities separately; no mutation enters a commit. + +Expected: deliberate negative control fails; restored production source and the full regression file pass. + +- [x] **Step 4b: Cover the remaining unsafe-path IPC gap.** Add one Electron case with a valid context positive control, then literal absolute/traversal/dot/empty/control/bidi/zero-width/lone-surrogate paths. Require the real IPC handler to reject every unsafe request before any new gh call, with zero provider starts or writes. This covers the second known integrated gap in the same #327 clause; no production behavior change. + +Run: `playwright test ... --grep 'unsafe context paths' --retries=0`. +Expected: one pass; if a product defect appears, preserve its failure and repair only after a meaningful RED. + +- [x] **Step 5: Qualify and record.** Run `pnpm build && pnpm test` and `pnpm test:e2e`, retaining logs and all first failures/skips. Write the dated receipt and status entry at literal tested scope, without ticking the full adversarial clause. Commit the complete slice with SSH signing; the final whole-branch review follows task completion as required by executing-plans. + +Expected: applicable checks terminal zero and receipt names exact versions/revisions/results/limits; no claim of live/human acceptance or protected delivery before its own evidence. + +## Final whole-branch review + +After Task 1 completion, request one fresh read-only review of the entire signed branch range using the plan/spec, exact receipts and all ledger rulings. Re-grade findings by their actual effects; fix Important/Critical findings in one coalesced RED-to-GREEN pass with applicable green suites, defer Minors explicitly and do not request a second review. Hand over every ruling/cost and deferred Minor before preserving/moving only this plan’s own skill workspace. Source hosted checks, the protected queue and full literal criterion acceptance remain separate gates. diff --git a/docs/superpowers/specs/2026-11-12-cr8-access-revocation-design.md b/docs/superpowers/specs/2026-11-12-cr8-access-revocation-design.md new file mode 100644 index 00000000..29ab500c --- /dev/null +++ b/docs/superpowers/specs/2026-11-12-cr8-access-revocation-design.md @@ -0,0 +1,19 @@ +# CR-8 accessible-to-revoked integration evidence + +The accepted #327 adversarial requirement names revoked access and no secret leakage. Service units already verify 403/404/410 invalidation and an in-flight context read, while existing Electron coverage starts with an inaccessible repository. This slice verifies the missing transition through the existing production renderer, preload, IPC, read service and GitHub CLI transport. + +## Contract and approach + +An initially visible private PR body and six ready IPC read variants must become unavailable after main observes 403, 404 or 410. A later network failure must never restore that PR's kept overview, resolve result, context, activity, checks or files. A different repository retains its legitimate same-account offline fallback. An already in-flight context response cannot resurrect revoked content. Provider starts and write calls remain zero; raw CLI diagnostics stay outside replies and rendered content. + +The executor chooses the existing WORLD_GH dependency boundary, adding an opt-in offline flag that emits a real CLI network failure for API reads while keeping the synthetic identity endpoint available. Defaults remain unchanged. Compared with extending service-unit coverage, this supplies the missing Electron boundary; compared with a live revocation exercise, it is deterministic and needs no personal account or repository permission changes. Neither alternative replaces this accepted fixture requirement. This is verification of existing policy, with no new product policy or activation decision. + +## Scope and limits + +Only the existing E2E regression file, synthetic gh fixture, this plan/spec and a dated receipt/status entry are intended changes. If a real product defect appears, preserve the first failure and add a demonstrated repair before expanding scope. Do not merge another owner's pending work. No live inference, GitHub mutation, release, default activation, real token or physical/human acceptance is involved. The full #327 criterion stays unchecked until all its clauses and actual protected delivery are independently audited. + +The same accepted adversarial clause also requires unsafe-path coverage. A source inventory found URL-path checks and request-validator units but no direct Electron context-path boundary case. Add one valid context positive control followed by literal unsafe requests, proving real IPC refusal with no additional gh calls, provider starts or mutations. This is a verification addition, not a new path policy. + +## Verification + +Write the integration tests first. Verify the new offline branch initially fails its positive control; implement that fixture capability and rerun. Existing policy may already pass: do not invent a production repair. Run a controlled temporary production mutation classifying 403 as transient offline, verify the 403 integration case fails, restore exact production bytes and verify the clean suite. Preserve every first failure and negative-control output separately. Run fresh build/full units and full repository E2E, one fresh whole-slice review and at most one coalesced Important/Critical correction pass. Verify signed source, recovery and current hosted/protected checks before delivery. Reuse only byte-proven unchanged baseline evidence. From ec34bd8f0ecef825cedf16295ceb59ac6b72ac27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=20Alexander=20=F0=9F=91=91?= Date: Thu, 12 Nov 2026 15:26:30 -0600 Subject: [PATCH 2/4] test: check denial diagnostics before offline retry Assert the visible denial and its direct reply before replacing the diagnostic-emitting route with offline mode. Preserve the old-test false negative, controlled RED, exact production restoration and complete corrected E2E results. --- .../e2e/code-review-regressions.spec.ts | 4 ++++ .../2026-11-12-cr8-access-revocation.md | 20 ++++++++++++++----- docs/status.md | 2 +- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/apps/desktop/e2e/code-review-regressions.spec.ts b/apps/desktop/e2e/code-review-regressions.spec.ts index 895fb739..ec359868 100644 --- a/apps/desktop/e2e/code-review-regressions.spec.ts +++ b/apps/desktop/e2e/code-review-regressions.spec.ts @@ -214,6 +214,10 @@ for (const status of [403, 404, 410]) test(`revoked access ${status}: an accessi await tid(page, "code-review-refresh").click(); await expect(tid(page, "code-review-overview-error")).toBeVisible(); await expect(tid(page, "code-review-overview-body")).not.toContainText("CR_REVOKED_PRIVATE_BODY"); + expect(await page.content()).not.toContain("REVOKED_DIAGNOSTIC_SENTINEL"); + const denial = await invoke({ op: "overview", requestId: `revoke-denial-${status}`, key }); + expect(denial.result).toMatchObject({ state: "unavailable", reason: status === 403 ? "denied" : "not-found" }); + expect(JSON.stringify(denial)).not.toMatch(/CR_REVOKED_(PRIVATE_BODY|CONTEXT|PATCH)|REVOKED_DIAGNOSTIC_SENTINEL/); h.world((w) => { w.offline = true; }); for (const request of reads) { const denied = await invoke(request); diff --git a/docs/reviews/2026-11-12-cr8-access-revocation.md b/docs/reviews/2026-11-12-cr8-access-revocation.md index 722d31e0..a764b25f 100644 --- a/docs/reviews/2026-11-12-cr8-access-revocation.md +++ b/docs/reviews/2026-11-12-cr8-access-revocation.md @@ -8,9 +8,9 @@ The development app uses a private synthetic profile, repository and gh configur ## Source and environment -The source base is protected main `30a56557cb09512396a7d0334bd1046cf0fba609`. There is no permanent application-code change. The temporary negative-control mutation was restored byte-for-byte before clean validation. Test source identities are: +The source base is protected main `30a56557cb09512396a7d0334bd1046cf0fba609`. There is no permanent application-code change. The temporary negative-control mutation was restored byte-for-byte before clean validation. Post-review correction test source identities are: -- `apps/desktop/e2e/code-review-regressions.spec.ts`: SHA-256 `53b9d30be948ad542cfa0092f285752c2dda76c790b6fbc8e3519859af721c06`. +- `apps/desktop/e2e/code-review-regressions.spec.ts`: SHA-256 `de1cb28cdc8ac45ce69625ab2df94908abd82292644fdc2708324b7d71be7ab6`. - `apps/desktop/test/fixtures/code-review-gh-world.ts`: SHA-256 `66bd389996fafea154bc2c2f351d245d99fb6dbf974b0e65da580096f1f7c5f1`. The host is macOS 27.2.1 arm64, Node 24.22.0 and pinned pnpm 10.34.5. The installed Electron package is 44.4.5; tests use its development-app launch with no packaged-app override. Package identity is distinct from a separate installed-release acceptance claim. @@ -27,7 +27,7 @@ Before the new fixture branch existed, the offline positive control failed in al A deliberate temporary production mutation classified ordinary 403 as offline. The 403 integration case failed because the private body remained visible and no denial notice appeared. Its trace and source backup are retained. Restoring the exact original production bytes, rebuilding main and running the whole regression file passed thirteen cases in 31.9 seconds. This proves test sensitivity; no production repair is claimed. -A further clause audit identified unsafe context paths as a second integration gap. The fifth case proves one real valid context read, then asks the real IPC handler for literal absolute, parent-traversal, dot/empty-segment, control, bidi, zero-width and lone-surrogate paths. Each must reject before an additional gh call; provider starts and mutations stay zero. The focused unsafe-path case passed in 2.0 seconds, with eight rejected path inputs and no further gh calls. The final full E2E run also passes this case. +A further clause audit identified unsafe context paths as a second integration gap. The fifth case proves one real valid context read, then asks the real IPC handler for literal absolute, parent-traversal, dot/empty-segment, control, bidi, zero-width and lone-surrogate paths. Each must reject before an additional gh call; provider starts and mutations stay zero. The focused unsafe-path case passed in 2.0 seconds, with eight rejected path inputs and no further gh calls. The pre-review full E2E also passed this case. ## Reproduction and qualification @@ -40,13 +40,21 @@ pnpm test pnpm test:e2e ``` -Fresh build, typecheck and full units passed: 2,570 unit passes, 36 explicit skips and zero failures/cancellations. The added path case changed only E2E inputs, and the qualification driver stopped at its source-freeze guard before E2E. Reconstructing the exact pre-addition source patch reproduced its recorded SHA-256, independently proving every non-E2E runtime/build/typecheck/unit/dependency producer unchanged. Those passed stages remain valid. Final full E2E passed on the unchanged five-case source snapshot: 525 desktop cases with eleven explicit skips in 22.1 minutes, eight site cases in 7.8 seconds and four web cases in 2.6 seconds. All fourteen cases in the modified regression file passed; no framework retry markers were observed. The eleven skips are four live-provider cases, four native local-model cases and three Open Knowledge opt-in cases; they are not acceptance passes. Independent review, hosted source checks and protected delivery remain pending. +Fresh build, typecheck and full units passed: 2,570 unit passes, 36 explicit skips and zero failures/cancellations. The added path case changed only E2E inputs, and the qualification driver stopped at its source-freeze guard before E2E. Reconstructing the exact pre-addition source patch reproduced its recorded SHA-256, independently proving every non-E2E runtime/build/typecheck/unit/dependency producer unchanged. Those passed stages remain valid. The pre-review full E2E at `51a7750` passed on its unchanged five-case source snapshot: 525 desktop cases with eleven explicit skips in 22.1 minutes, eight site cases in 7.8 seconds and four web cases in 2.6 seconds. All fourteen cases in the modified regression file passed; no framework retry markers were observed. The eleven skips are four live-provider cases, four native local-model cases and three Open Knowledge opt-in cases; they are not acceptance passes. One fresh whole-branch review of signed `51a7750` is complete; hosted source checks and protected delivery remain pending. The reviewer identified a diagnostic assertion gap graded Minor; the executor treated it as Important for the no-leak acceptance evidence and is completing one coalesced correction, without a second review. The original pre-review full-suite pass remains historical; it does not qualify changed assertions. + +## Review correction + +The table cases now check rendered content while the denial is still visible and independently check an actual denial reply before offline mode masks the diagnostic-emitting route. A temporary production mutation adds a synthetic diagnostic to the ordinary 403 public detail. The old assertions pass despite an explicit denial DOM capture containing that marker; the new immediate assertion fails under the same control. Production source is restored byte-for-byte and all fourteen regressions pass. This is an assertion correction, not a discovered production leak or product repair. + +The first observation probe could not verify the DOM because the manually launched Electron trace contained test steps without frame snapshots. That attempt and its exact source restoration are retained; a temporary explicit DOM artifact supplied the missing observation and was removed before clean validation. No observation failure is hidden. The original fixture RED source was also recovered exactly from the source bytes embedded in its retained trace. + +Only the E2E regression file changed after the verified source; the shared fixture and every non-E2E production/build/typecheck/unit/dependency input remain identical. Their passed results are reused with explicit name/hash guards. The corrected full E2E run passed on unchanged inputs: 525 desktop cases with eleven explicit skips in 22.1 minutes, eight site cases in 7.5 seconds and four web cases in 2.5 seconds, including all fourteen regressions and no framework retry markers. The local correction is qualified; no second review was requested. Source-hosted checks, protected delivery and the complete current-main criterion audit remain separate gates. ## Acceptance limits These fixtures establish bounded no-fallback/no-late-payload and IPC-validation behavior under named synthetic failures. They do not prove live provider quality, a real GitHub revocation, real-write canaries, human accessibility, physical-device behavior, a fresh release candidate or the entire adversarial clause. Code Review stays hidden by default and no release or execution-admission policy changes. -The complete local logs are retained privately with these SHA-256 identities: +The complete pre-review `51a7750` local logs are retained privately with these SHA-256 identities; the E2E row does not qualify the later assertion correction: | Command | Raw log SHA-256 | | --- | --- | @@ -54,3 +62,5 @@ The complete local logs are retained privately with these SHA-256 identities: | `pnpm typecheck` | `5a4f48927c40e455183c8d566825aecafa1e3f2c6ae89f4d0d142a6852bdd80c` | | `pnpm test` | `165404057e24c511e8885c48ca785c8fda9792ceb9c3b608de741be4b41b96be` | | `pnpm test:e2e` | `d68960f12a9f3c1412ba79fca0f2619aca055fdd5b8f104eb6153b857cf156b6` | + +The corrected full E2E log has SHA-256 `e58274a50c51a97ca3bb964037d1a4073ea14e7961859f3b6df8405dbf17b87b`. The two source identities above bind these post-review results; the earlier log table remains explicitly historical. diff --git a/docs/status.md b/docs/status.md index ea194c8d..64714a0c 100644 --- a/docs/status.md +++ b/docs/status.md @@ -159,7 +159,7 @@ before relying on a tick. - **Local draft destination fence** (#380, #381, #498). Final review found that an asynchronous local selection could accept input/send through its old non-local configuration before the target was pinned. Two controlled regressions failed; the repair reserves and fences only the source/new target, preserves the exact raw draft, and leaves unrelated Stop and editing available. All three focused Electron cases and full frozen build/typechecks/units pass (2,465 unit passes, 36 skips), followed by 511 desktop E2E passes with 11 skips and seven site passes. Fresh hosted qualification and protected delivery remain required. Product local execution remains unadmitted. [Failure, repair and limits](reviews/2026-11-11-local-selection-fence.md). - **iPhone image-binding diagnostics** (#109, #498). The prior manifest collapsed container-query failures, realpath failures and image mismatches into app-image refusals. A diagnostic-only increment retains at most 16 callback/time-bound outcomes with sanitized error metadata and unchanged identity/command/stop guards. Six baseline controls fail; all 25 observer cases pass after the change. Full frozen build/typechecks/units pass with 2,471 passes, 36 skips and zero failures/cancellations. Fresh hosted observation remains required; no successful stack binding or older TLS cause is claimed. [Evidence and limits](reviews/2026-11-11-ios-image-binding-diagnostics.md). - **iPhone trust observer collection** (#498). Published `188af74` passed 44 iPhone tests with zero actual failures, but its observer stopped after six poll errors and unconfirmed command closure, with no callbacks/stacks captured. A predicate-only experiment narrows app/Security and trustd-peer logs while keeping every bound and identity guard. Native Foundation predicate replay goes from output-limit failure to 21 selected records with preserved app/trustd correlation; all 19 focused tests pass. Full build/typechecks and units passed with 2,465 passes, 36 skips and zero failures/cancellations. Fresh `aa095b2` app qualification passes 44 tests, but nine image-binding refusal entries yielded zero bound observers/stacks; five distinct callbacks in offline diagnostics completed normally. Live stack binding remains unqualified and the older trust-stall cause remains unknown. [Evidence and limits](reviews/2026-11-11-ios-trust-predicate.md). -- **Code Review revocation integration evidence** (#327). An owned candidate adds actual Electron/IPC accessible-to-revoked cases for 403/404/410, a held context response and an unsafe context-path boundary. Four focused revocation cases pass; a deliberate temporary 403-as-offline mutation fails with the private body still visible, and the exact restored production source passes all thirteen then-current regressions. The path case also passes, and fresh build/typechecks plus 2,570 units with 36 explicit skips pass. Full E2E passes 525 desktop cases with eleven explicit opt-in skips, eight site cases and four web cases, including all fourteen regressions. Independent review and protected delivery remain pending; no full adversarial, live-provider, real-write or human acceptance is claimed. [Evidence and limits](reviews/2026-11-12-cr8-access-revocation.md). +- **Code Review revocation integration evidence** (#327). An owned candidate adds actual Electron/IPC accessible-to-revoked cases for 403/404/410, a held context response and an unsafe context-path boundary. Four focused revocation cases pass; a deliberate temporary 403-as-offline mutation fails with the private body still visible, and the exact restored production source passes all thirteen then-current regressions. The path case also passes, and fresh build/typechecks plus 2,570 units with 36 explicit skips pass. Full E2E passes 525 desktop cases with eleven explicit opt-in skips, eight site cases and four web cases, including all fourteen regressions. One fresh review is complete; an immediate denial-diagnostic assertion gap is corrected and all fourteen regressions pass again. Post-correction full E2E also passes 525 desktop cases with eleven skips, eight site cases and four web cases; source-hosted and protected delivery remain pending; no full adversarial, live-provider, real-write or human acceptance is claimed. [Evidence and limits](reviews/2026-11-12-cr8-access-revocation.md). - **Code Review native-modal investigation** (#498). Parent `fc593e0` timed out clicking Settings before Jev contrast collection; teardown then timed out and the job reached its 45-minute limit. The retained Electron stack is inside `NSAlert runModal`, with dialog message and cause unknown. A test-only candidate records bounded owned-child stderr and observes uncaught exceptions without handling them; five real-child controls and all eight accessibility cases pass locally. Full build/typechecks and units passed with 2,460 passes, 36 skips and zero failures/cancellations. Exact-head hosted qualification remains required; no causal repair or acceptance is claimed. [Observation and limits](reviews/2026-11-11-electron-modal-observation.md). - **Linux Debian source continuity** (#498). Candidate `188af74` acquired all four signed Noble pockets and installed host dependencies, then failed baseline Debian installation because `libnotify4` was not installable. The next candidate keeps explicit signed sources through both baseline and upgrade dependency resolution, preserving artifact verification, installed checks and the three-minute direct command bound. All 13 synthetic helper/wrapper cases and final corrected-source build/typechecks/units pass, with 2,465 passes, 36 skips and zero failures/cancellations. Fresh `aa095b2` hosted installed checks now pass eight Linux launches plus controlled KWallet5 and three Windows NSIS/DPAPI launches; original installer acceptance remains pending, including historical-schema, full graphical-login and real-account limits. [Failure, candidate and limits](reviews/2026-11-11-linux-debian-sources.md). - **Linux qualification host preparation** (#498). Candidate `5edbb84` passed required hosted macOS, iPhone and Windows checks, but both Linux attempts stopped at the 30-minute job limit during Azure Ubuntu mirror DNS failures before installed-app acceptance. The CI-only repair selects official signed Noble archive/security sources per APT invocation, bounds acquisition and the host step, and preserves the nine packages and downstream installed acceptance. Build passed; final full units passed with 2,427 passes, 35 skips and zero failures. Seven focused helper cases and independent review cover argument boundaries, failure propagation and owned temporary cleanup. Application/native inputs are unchanged. Fresh exact-head hosted qualification remains required; no Linux acceptance or product admission is claimed. [Failure evidence, repair and limits](reviews/2026-11-11-linux-host-preparation.md). From cfbd8c3654643facbd8ac49614b49faa9d42216b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=20Alexander=20=F0=9F=91=91?= Date: Thu, 12 Nov 2026 17:43:16 -0600 Subject: [PATCH 3/4] fix: scope menu rename commands to the active chat Prevent a previous Rename command from reopening editing on later chat titles and saving a stale initial title. Add a direct regression, follow keyboard-associated details cards, and quiesce private-app writers before privacy scans. Validation: original-source regression fails; rebuilt focused cases pass 3/3, complete app/question suites pass 22/22, and typecheck passes. Full current-main qualification remains pending before push. --- apps/desktop/e2e/app.spec.ts | 63 ++++++++++++++++++- apps/desktop/e2e/human-requests.spec.ts | 4 ++ .../src/renderer/components/TitleBar.tsx | 8 ++- .../2026-11-12-cr8-access-revocation.md | 16 ++++- docs/status.md | 2 +- 5 files changed, 87 insertions(+), 6 deletions(-) diff --git a/apps/desktop/e2e/app.spec.ts b/apps/desktop/e2e/app.spec.ts index 7f3f01e1..69d3d73d 100644 --- a/apps/desktop/e2e/app.spec.ts +++ b/apps/desktop/e2e/app.spec.ts @@ -785,11 +785,20 @@ test("accessibility: information text meets AA contrast, keyboard focus is visib // Truncated titles and shortcut-bearing rows explain themselves on hover. const rowTitle = await tid(currentRow(page), "thread-row-title").innerText(); - await expect(currentRow(page).getByRole("button").first()).toHaveAccessibleName(rowTitle); - await currentRow(page).getByRole("button").first().focus(); + const rowButton = currentRow(page).getByRole("button").first(); + await expect(rowButton).toHaveAccessibleName(rowTitle); + await rowButton.focus(); await page.keyboard.press("ArrowRight"); - await expect(page.getByRole("dialog", { name: "Chat details" })).toContainText(rowTitle); + // The pointer can still inspect another row: follow this keyboard control's actual association. + await expect(rowButton).toHaveAttribute("aria-controls", /\S/); + const details = page.locator(`[id=${JSON.stringify(await rowButton.getAttribute("aria-controls"))}]`); + await expect(details).toHaveRole("dialog"); + await expect(details).toHaveAccessibleName("Chat details"); + await expect(details).toContainText(rowTitle); + await expect(details.locator("summary")).toBeFocused(); await page.keyboard.press("Escape"); + await expect(details).toHaveCount(0); + await expect(rowButton).toBeFocused(); await expect(tid(page, "new-chat")).toHaveAttribute("title", /⌘N/); // Spinners and the thinking shimmer stop when the OS asks for reduced motion. @@ -799,3 +808,51 @@ test("accessibility: information text meets AA contrast, keyboard focus is visib expect(await spin()).toBe("none"); await page.emulateMedia({ reducedMotion: "no-preference" }); }); + + +test("a menu rename belongs to that chat and never opens editing on a later chat", async () => { + await createThread(page, "Rename intent seed"); + await tid(page, "thread-menu-toggle").click(); + await tid(page, "action-rename").click(); + const title = tid(page, "thread-title"); + await expect(title).not.toHaveAttribute("readonly", ""); + await title.fill("Explicitly renamed seed"); + await title.press("Enter"); + await expect(title).toHaveAttribute("readonly", ""); + await expect(tid(currentRow(page), "thread-row-title")).toHaveText("Explicitly renamed seed"); + const later = await createThread(page, "Later chat fixture"); + await expect(title).toHaveAttribute("readonly", ""); + await tid(page, "composer-input").focus(); + const saved = await page.evaluate(async (id) => (await window.modex!.invoke("state:get", undefined)).threads.find(x => x.id === id), later); + expect(saved?.titleSource, "a later chat was not manually renamed").not.toBe("manual"); +}); + +test("keyboard chat details follows its associated card while another chat is hovered", async () => { + await page.mouse.move(0, 0); + await page.keyboard.press("Escape"); + await expect(page.getByRole("dialog", { name: "Chat details" })).toHaveCount(0); + const pointerId = await createThread(page, "Pointer details fixture"); + const keyboardId = await createThread(page, "Keyboard details fixture"); + // Other cases may change automatic naming; these two identities are fixture inputs, not title tests. + await page.evaluate(async ([pointerId, keyboardId]) => { + await window.modex!.invoke("thread:update", { threadId: pointerId!, patch: { title: "Pointer details fixture" } }); + await window.modex!.invoke("thread:update", { threadId: keyboardId!, patch: { title: "Keyboard details fixture" } }); + }, [pointerId, keyboardId]); + const pointer = page.locator(`[data-testid="thread-row"][data-thread-id="${pointerId}"]`); + const keyboard = page.locator(`[data-testid="thread-row"][data-thread-id="${keyboardId}"]`).getByRole("button").first(); + await expect(keyboard).toHaveAccessibleName("Keyboard details fixture"); + await pointer.hover(); + await expect(page.getByRole("dialog", { name: "Chat details" })).toHaveCount(1); + await keyboard.focus(); + await page.keyboard.press("ArrowRight"); + await expect(keyboard).toHaveAttribute("aria-controls", /\S/); + const details = page.locator(`[id=${JSON.stringify(await keyboard.getAttribute("aria-controls"))}]`); + await expect(details).toHaveRole("dialog"); + await expect(details).toHaveAccessibleName("Chat details"); + await expect(details).toContainText("Keyboard details fixture"); + await expect(details).not.toContainText("Pointer details fixture"); + await expect(details.locator("summary")).toBeFocused(); + await page.keyboard.press("Escape"); + await expect(details).toHaveCount(0); + await expect(keyboard).toBeFocused(); +}); diff --git a/apps/desktop/e2e/human-requests.spec.ts b/apps/desktop/e2e/human-requests.spec.ts index 4d3d35d0..c61cc69e 100644 --- a/apps/desktop/e2e/human-requests.spec.ts +++ b/apps/desktop/e2e/human-requests.spec.ts @@ -175,6 +175,8 @@ for (const moveFocus of [false, true]) test(`a native question preserves the exi const transcript = JSON.parse(fs.readFileSync(path.join(home, "app/threads", `${threadId}.json`), "utf8")); expect(transcript.filter((item: { kind: string }) => item.kind === "user").map((item: { text: string }) => item.text)).toEqual(["deploy it"]); expect(replies(logs)).toHaveLength(1); + await app.close(); + app = undefined; expect(everything(path.join(home, "app"))).not.toContain("question-only-secret"); } finally { await app?.close(); fs.rmSync(logs, { recursive: true, force: true }); } }); @@ -242,6 +244,8 @@ test("Codex questions: the card answers by its schema, the CLI hears once, the s await expect.poll(() => replies(logs).length).toBe(2); expect(replies(logs)[1]).toMatchObject({ request: 902, error: { code: -32000 } }); + await app.close(); + app = undefined; // Nothing Modex saved (threads, journal, state) holds the secret. expect(everything(path.join(home, "app")).includes("s3cr3t-token")).toBe(false); } finally { diff --git a/apps/desktop/src/renderer/components/TitleBar.tsx b/apps/desktop/src/renderer/components/TitleBar.tsx index 49378775..03748913 100644 --- a/apps/desktop/src/renderer/components/TitleBar.tsx +++ b/apps/desktop/src/renderer/components/TitleBar.tsx @@ -93,7 +93,13 @@ function ThreadTitle({ title, onRename, renameSignal }: { title: string; onRenam const [editing, setEditing] = useState(false); const [draft, setDraft] = useState(title); const input = useRef(null); - useEffect(() => { if (renameSignal > 0) setEditing(true); }, [renameSignal]); + // A menu command applies to the mounted title, never to a later thread. + const seenRenameSignal = useRef(renameSignal); + useEffect(() => { + if (renameSignal === seenRenameSignal.current) return; + seenRenameSignal.current = renameSignal; + setEditing(true); + }, [renameSignal]); useEffect(() => { if (!editing) setDraft(title); }, [title, editing]); useEffect(() => { if (editing) { input.current?.focus(); input.current?.select(); } }, [editing]); diff --git a/docs/reviews/2026-11-12-cr8-access-revocation.md b/docs/reviews/2026-11-12-cr8-access-revocation.md index a764b25f..4bc5d7f3 100644 --- a/docs/reviews/2026-11-12-cr8-access-revocation.md +++ b/docs/reviews/2026-11-12-cr8-access-revocation.md @@ -8,7 +8,7 @@ The development app uses a private synthetic profile, repository and gh configur ## Source and environment -The source base is protected main `30a56557cb09512396a7d0334bd1046cf0fba609`. There is no permanent application-code change. The temporary negative-control mutation was restored byte-for-byte before clean validation. Post-review correction test source identities are: +The original revocation-evidence source base is protected main `30a56557cb09512396a7d0334bd1046cf0fba609`. That original slice had no permanent application-code change; the later hosted-failure follow-up below includes a title-editing repair. The temporary negative-control mutation was restored byte-for-byte before clean validation. Post-review correction test source identities are: - `apps/desktop/e2e/code-review-regressions.spec.ts`: SHA-256 `de1cb28cdc8ac45ce69625ab2df94908abd82292644fdc2708324b7d71be7ab6`. - `apps/desktop/test/fixtures/code-review-gh-world.ts`: SHA-256 `66bd389996fafea154bc2c2f351d245d99fb6dbf974b0e65da580096f1f7c5f1`. @@ -64,3 +64,17 @@ The complete pre-review `51a7750` local logs are retained privately with these S | `pnpm test:e2e` | `d68960f12a9f3c1412ba79fca0f2619aca055fdd5b8f104eb6153b857cf156b6` | The corrected full E2E log has SHA-256 `e58274a50c51a97ca3bb964037d1a4073ea14e7961859f3b6df8405dbf17b87b`. The two source identities above bind these post-review results; the earlier log table remains explicitly historical. + +## First hosted failure and file-scan correction + +The first source-hosted macOS job for signed `ec34bd8f0ecef825cedf16295ceb59ac6b72ac27` ([job 131506002482](https://github.com/TypeSafeAI/modex/actions/runs/43310778556/job/131506002482)) failed after 38.5 minutes of desktop E2E: 529 passed, 14 skipped and one existing human-question draft/focus test failed. All fourteen Code Review regression cases passed. The failing recursive privacy scan enumerated `update-recovery.json..tmp` while the private app was still writing, then received ENOENT after atomic rename. The first log and all four artifacts are preserved with matching API SHA-256 digests and verified ZIPs. Site and web were not reached by the failed chained command. + +A deterministic control using the exact existing scanner reproduced the enumeration/read ENOENT when the temporary file was renamed between those operations; the unchanged scanner read the final file after writer quiescence. The correction adds only app closure and handle clearing after all UI assertions but before each of the two live-app privacy scans, matching the existing journal-enabled test. The scanner, all secret assertions and all account/focus/draft assertions remain unchanged; no filename is excluded, error ignored, retry added or product behavior changed. New full qualification is pending. + +## Hosted-failure follow-up: associated cards and chat rename intent + +The first local full validation of the file-scan correction passed build, typecheck and 2,570 units with 36 skips, then failed an existing accessibility assertion after 524 desktop passes and eleven skips. The assertion selected every Chat details dialog while pointer and keyboard targets could differ. The correction follows the focused chat button's actual `aria-controls` relation and preserves role, accessible name, content, focus, Escape and focus-return assertions. A deterministic two-chat regression reproduces the old global selector failure and verifies the associated card. + +The complete affected suite then exposed a separate production defect: after a menu Rename, the title bar's persistent command counter caused every later keyed chat title to enter editing on mount. An initial New thread draft could then overwrite the later title on blur. Both renderer and main-process state captured the stale title as manual. A direct menu-Rename-then-create-chat regression fails on the original source because the later title is editable. The repair remembers the command counter on mount and enters editing only for a newly received command. It preserves ordinary menu, double-click and Enter rename behavior. + +The first post-edit focused launch mistakenly reused the previously built renderer and failed; that observation and its artifacts remain retained and do not qualify the repair. After rebuilding the renderer, all three focused cases passed in 12.2 seconds: accessibility, menu rename isolation and keyboard-card association. The complete app and human-question suites then passed all 22 cases in 52.1 seconds, including the earlier menu-Rename sequence and all six question cases. Fresh current-main build, typecheck, unit and full E2E qualification remain pending. These first failures do not change any privacy assertion, add retries or establish human/native/release acceptance. diff --git a/docs/status.md b/docs/status.md index 64714a0c..6edef35d 100644 --- a/docs/status.md +++ b/docs/status.md @@ -159,7 +159,7 @@ before relying on a tick. - **Local draft destination fence** (#380, #381, #498). Final review found that an asynchronous local selection could accept input/send through its old non-local configuration before the target was pinned. Two controlled regressions failed; the repair reserves and fences only the source/new target, preserves the exact raw draft, and leaves unrelated Stop and editing available. All three focused Electron cases and full frozen build/typechecks/units pass (2,465 unit passes, 36 skips), followed by 511 desktop E2E passes with 11 skips and seven site passes. Fresh hosted qualification and protected delivery remain required. Product local execution remains unadmitted. [Failure, repair and limits](reviews/2026-11-11-local-selection-fence.md). - **iPhone image-binding diagnostics** (#109, #498). The prior manifest collapsed container-query failures, realpath failures and image mismatches into app-image refusals. A diagnostic-only increment retains at most 16 callback/time-bound outcomes with sanitized error metadata and unchanged identity/command/stop guards. Six baseline controls fail; all 25 observer cases pass after the change. Full frozen build/typechecks/units pass with 2,471 passes, 36 skips and zero failures/cancellations. Fresh hosted observation remains required; no successful stack binding or older TLS cause is claimed. [Evidence and limits](reviews/2026-11-11-ios-image-binding-diagnostics.md). - **iPhone trust observer collection** (#498). Published `188af74` passed 44 iPhone tests with zero actual failures, but its observer stopped after six poll errors and unconfirmed command closure, with no callbacks/stacks captured. A predicate-only experiment narrows app/Security and trustd-peer logs while keeping every bound and identity guard. Native Foundation predicate replay goes from output-limit failure to 21 selected records with preserved app/trustd correlation; all 19 focused tests pass. Full build/typechecks and units passed with 2,465 passes, 36 skips and zero failures/cancellations. Fresh `aa095b2` app qualification passes 44 tests, but nine image-binding refusal entries yielded zero bound observers/stacks; five distinct callbacks in offline diagnostics completed normally. Live stack binding remains unqualified and the older trust-stall cause remains unknown. [Evidence and limits](reviews/2026-11-11-ios-trust-predicate.md). -- **Code Review revocation integration evidence** (#327). An owned candidate adds actual Electron/IPC accessible-to-revoked cases for 403/404/410, a held context response and an unsafe context-path boundary. Four focused revocation cases pass; a deliberate temporary 403-as-offline mutation fails with the private body still visible, and the exact restored production source passes all thirteen then-current regressions. The path case also passes, and fresh build/typechecks plus 2,570 units with 36 explicit skips pass. Full E2E passes 525 desktop cases with eleven explicit opt-in skips, eight site cases and four web cases, including all fourteen regressions. One fresh review is complete; an immediate denial-diagnostic assertion gap is corrected and all fourteen regressions pass again. Post-correction full E2E also passes 525 desktop cases with eleven skips, eight site cases and four web cases; source-hosted and protected delivery remain pending; no full adversarial, live-provider, real-write or human acceptance is claimed. [Evidence and limits](reviews/2026-11-12-cr8-access-revocation.md). +- **Code Review revocation integration evidence** (#327). An owned candidate adds actual Electron/IPC accessible-to-revoked cases for 403/404/410, a held context response and an unsafe context-path boundary. Four focused revocation cases pass; a deliberate temporary 403-as-offline mutation fails with the private body still visible, and the exact restored production source passes all thirteen then-current regressions. The path case also passes, and fresh build/typechecks plus 2,570 units with 36 explicit skips pass. Full E2E passes 525 desktop cases with eleven explicit opt-in skips, eight site cases and four web cases, including all fourteen regressions. One fresh review is complete; an immediate denial-diagnostic assertion gap is corrected and all fourteen regressions pass again. Post-correction full E2E also passes 525 desktop cases with eleven skips, eight site cases and four web cases; the first source-hosted macOS run fails an existing human-question privacy scan on an atomic temporary-file rename, while all fourteen regressions pass. The follow-up closes the private app before the unchanged scan, follows the keyboard target’s associated details card and repairs a reproduced title-bar bug where an old Rename command opened editing on later chats. Three focused cases and all 22 complete app/human-question cases pass after rebuilding; fresh current-main full qualification and protected delivery remain pending. No full adversarial, live-provider, real-write or human acceptance is claimed. [Evidence and limits](reviews/2026-11-12-cr8-access-revocation.md). - **Code Review native-modal investigation** (#498). Parent `fc593e0` timed out clicking Settings before Jev contrast collection; teardown then timed out and the job reached its 45-minute limit. The retained Electron stack is inside `NSAlert runModal`, with dialog message and cause unknown. A test-only candidate records bounded owned-child stderr and observes uncaught exceptions without handling them; five real-child controls and all eight accessibility cases pass locally. Full build/typechecks and units passed with 2,460 passes, 36 skips and zero failures/cancellations. Exact-head hosted qualification remains required; no causal repair or acceptance is claimed. [Observation and limits](reviews/2026-11-11-electron-modal-observation.md). - **Linux Debian source continuity** (#498). Candidate `188af74` acquired all four signed Noble pockets and installed host dependencies, then failed baseline Debian installation because `libnotify4` was not installable. The next candidate keeps explicit signed sources through both baseline and upgrade dependency resolution, preserving artifact verification, installed checks and the three-minute direct command bound. All 13 synthetic helper/wrapper cases and final corrected-source build/typechecks/units pass, with 2,465 passes, 36 skips and zero failures/cancellations. Fresh `aa095b2` hosted installed checks now pass eight Linux launches plus controlled KWallet5 and three Windows NSIS/DPAPI launches; original installer acceptance remains pending, including historical-schema, full graphical-login and real-account limits. [Failure, candidate and limits](reviews/2026-11-11-linux-debian-sources.md). - **Linux qualification host preparation** (#498). Candidate `5edbb84` passed required hosted macOS, iPhone and Windows checks, but both Linux attempts stopped at the 30-minute job limit during Azure Ubuntu mirror DNS failures before installed-app acceptance. The CI-only repair selects official signed Noble archive/security sources per APT invocation, bounds acquisition and the host step, and preserves the nine packages and downstream installed acceptance. Build passed; final full units passed with 2,427 passes, 35 skips and zero failures. Seven focused helper cases and independent review cover argument boundaries, failure propagation and owned temporary cleanup. Application/native inputs are unchanged. Fresh exact-head hosted qualification remains required; no Linux acceptance or product admission is claimed. [Failure evidence, repair and limits](reviews/2026-11-11-linux-host-preparation.md). From 81e54f816b49850f6acdeb1c3f668c7411637309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=20Alexander=20=F0=9F=91=91?= Date: Thu, 12 Nov 2026 18:17:41 -0600 Subject: [PATCH 4/4] test: qualify rename isolation and integrated review safeguards Strengthen the later-chat regression with saved-title/provenance preservation and fresh menu, double-click and Enter editing. Record both addressed review suggestions, original failures and current-main full-suite evidence. Validation: build/typecheck, 2579 units with 36 skips, 529 desktop cases with 17 skips, 8 site and 4 web pass. Separate installed Claude 2.1.323 native qualification: 4 ordinary passes and 2 intentional expected-failure controls, 3 native starts, unchanged producer inputs and verified retained artifacts. Hosted and protected delivery remain pending. --- apps/desktop/e2e/app.spec.ts | 32 +++++++++++++++++-- .../2026-11-12-cr8-access-revocation.md | 16 +++++++++- docs/status.md | 2 +- .../plans/2026-11-12-cr8-access-revocation.md | 6 ++++ ...2026-11-12-cr8-access-revocation-design.md | 6 ++++ 5 files changed, 57 insertions(+), 5 deletions(-) diff --git a/apps/desktop/e2e/app.spec.ts b/apps/desktop/e2e/app.spec.ts index 9c758b8a..a6dea461 100644 --- a/apps/desktop/e2e/app.spec.ts +++ b/apps/desktop/e2e/app.spec.ts @@ -809,7 +809,6 @@ test("accessibility: information text meets AA contrast, keyboard focus is visib await page.emulateMedia({ reducedMotion: "no-preference" }); }); - test("a menu rename belongs to that chat and never opens editing on a later chat", async () => { await createThread(page, "Rename intent seed"); await tid(page, "thread-menu-toggle").click(); @@ -822,9 +821,36 @@ test("a menu rename belongs to that chat and never opens editing on a later chat await expect(tid(currentRow(page), "thread-row-title")).toHaveText("Explicitly renamed seed"); const later = await createThread(page, "Later chat fixture"); await expect(title).toHaveAttribute("readonly", ""); + const readLater = () => page.evaluate(async (id) => (await window.modex!.invoke("state:get", undefined)).threads.find(x => x.id === id), later); + const beforeBlur = await readLater(); + expect(beforeBlur).toBeDefined(); + expect(beforeBlur!.titleSource, "a later chat was not manually renamed").not.toBe("manual"); + await expect(title).toHaveValue(beforeBlur!.title); await tid(page, "composer-input").focus(); - const saved = await page.evaluate(async (id) => (await window.modex!.invoke("state:get", undefined)).threads.find(x => x.id === id), later); - expect(saved?.titleSource, "a later chat was not manually renamed").not.toBe("manual"); + expect(await readLater()).toMatchObject({ id: later, title: beforeBlur!.title, titleSource: beforeBlur!.titleSource }); + + // A later mount still accepts new edit commands through every entry point. + await tid(page, "thread-menu-toggle").click(); + await tid(page, "action-rename").click(); + await expect(title).not.toHaveAttribute("readonly", ""); + await title.fill("Later explicitly renamed"); + await title.press("Enter"); + await expect(title).toHaveAttribute("readonly", ""); + await expect(title).toHaveValue("Later explicitly renamed"); + await title.dblclick(); + await expect(title).not.toHaveAttribute("readonly", ""); + await title.fill("Cancelled later title"); + await title.press("Escape"); + await expect(title).toHaveAttribute("readonly", ""); + await expect(title).toHaveValue("Later explicitly renamed"); + await title.focus(); + await title.press("Enter"); + await expect(title).not.toHaveAttribute("readonly", ""); + await title.fill("Later keyboard renamed"); + await title.press("Enter"); + await expect(title).toHaveAttribute("readonly", ""); + await expect(title).toHaveValue("Later keyboard renamed"); + expect(await readLater()).toMatchObject({ id: later, title: "Later keyboard renamed", titleSource: "manual" }); }); test("keyboard chat details follows its associated card while another chat is hovered", async () => { diff --git a/docs/reviews/2026-11-12-cr8-access-revocation.md b/docs/reviews/2026-11-12-cr8-access-revocation.md index 4bc5d7f3..33b0132a 100644 --- a/docs/reviews/2026-11-12-cr8-access-revocation.md +++ b/docs/reviews/2026-11-12-cr8-access-revocation.md @@ -75,6 +75,20 @@ A deterministic control using the exact existing scanner reproduced the enumerat The first local full validation of the file-scan correction passed build, typecheck and 2,570 units with 36 skips, then failed an existing accessibility assertion after 524 desktop passes and eleven skips. The assertion selected every Chat details dialog while pointer and keyboard targets could differ. The correction follows the focused chat button's actual `aria-controls` relation and preserves role, accessible name, content, focus, Escape and focus-return assertions. A deterministic two-chat regression reproduces the old global selector failure and verifies the associated card. -The complete affected suite then exposed a separate production defect: after a menu Rename, the title bar's persistent command counter caused every later keyed chat title to enter editing on mount. An initial New thread draft could then overwrite the later title on blur. Both renderer and main-process state captured the stale title as manual. A direct menu-Rename-then-create-chat regression fails on the original source because the later title is editable. The repair remembers the command counter on mount and enters editing only for a newly received command. It preserves ordinary menu, double-click and Enter rename behavior. +Two complete affected-suite attempts each ended with 20 passes and one failure; a read-only app-file diagnostic then ended with fourteen passes and one failure. Explicit fixture titles did not repair that failure. These retained attempts exposed a separate production defect: after a menu Rename, the title bar's persistent command counter caused every later keyed chat title to enter editing on mount. An initial New thread draft could then overwrite the later title on blur. Both renderer and main-process state captured the stale title as manual. A direct menu-Rename-then-create-chat regression fails on the original source because the later title is editable. The repair remembers the command counter on mount and enters editing only for a newly received command. It preserves ordinary menu, double-click and Enter rename behavior. The first post-edit focused launch mistakenly reused the previously built renderer and failed; that observation and its artifacts remain retained and do not qualify the repair. After rebuilding the renderer, all three focused cases passed in 12.2 seconds: accessibility, menu rename isolation and keyboard-card association. The complete app and human-question suites then passed all 22 cases in 52.1 seconds, including the earlier menu-Rename sequence and all six question cases. Fresh current-main build, typecheck, unit and full E2E qualification remain pending. These first failures do not change any privacy assertion, add retries or establish human/native/release acceptance. + +## Current-main integration and independent follow-up review + +One fresh independent review of the new follow-up found no Critical or Important defects and two Minor coverage suggestions. Both were accepted: the regression now requires an existing saved later chat and preserves its exact title/provenance across blur, then exercises fresh menu Rename, double-click cancellation and focused Enter commit on that later keyed title. No minor is deferred. The review's other scope limits remain explicit acceptance or delivery gates; no second review was requested. + +The signed fix checkpoint `cfbd8c3` was integrated without conflicts with protected main `b6e3026234cf39c51f5ad0dbb6183f3c5c5b0b83` in signed merge `23b22cd`. Relative to that main, the production title-bar delta is exactly the reviewed command-counter guard; current-main controls are preserved. After the two assertion improvements, the current-main build passed and the complete affected suites passed all 22 cases in 51.5 seconds. Fresh integrated typecheck and full units passed: 2,579 passes, 36 explicit skips and zero failures/cancellations across all six test groups. Full integrated E2E passed on that unchanged source: 529 desktop cases with 17 explicit skips in 20.6 minutes, eight site cases in 7.9 seconds and four web cases in 2.7 seconds, with zero failures or retry/flaky annotations. All fourteen Code Review regression cases passed. The 17 skips are four live-provider, four local-model native, three Open Knowledge and six opt-in installed-CLI Code Review checks; none is an acceptance pass. The complete output artifacts were archived and 185 files independently byte-compared before starting the separate native qualification. These current results qualify the integrated affected behavior; earlier 22-case and full-suite results remain historical. Source-hosted and actual protected delivery are pending. + +## Fresh integrated installed-CLI qualification + +After the complete E2E artifacts were preserved, the opt-in installed-CLI boundary suite passed on this same frozen integrated candidate with Claude Code 2.1.323, Electron 44.4.5, Chromium 152.0.7977.130 and embedded Node 24.21.0 on macOS arm64. The six checks took 18.9 seconds: four ordinary passes and two intentional expected-failure controls, with no unexpected failure or framework retry. They produced three native starts, one per exercised provider run. The actual CLI read the injected PR snapshot and allowed selected evidence while refusing outside-secret and symlink reads, shell, file write, WebFetch, MCP and the deferred placeholder. Effect markers remained absent. + +All three native records retained their observations and inputs. The two fault controls retained the intended callback or app-close failure and verified their follow-up receipts. A root audit independently observed all three recorded native PIDs absent and all three provider ports refusing connections; these are sampled closure observations, not exhaustive descendant proof. All producer-file hashes still matched the full-suite input manifest. Fifty native output files and all three owned synthetic fixture trees were copied and independently byte-compared. Incoming GH_TOKEN was already absent, so this does not establish a supplied-token native scrub challenge; the separate unit evidence retains that scope. The provider and GitHub data were scripted, with no paid inference or live write. Native candidate qualification does not replace the final actual-main source-equivalence and literal-clause audit required before ticking #327's full adversarial criterion. + +The fresh integrated full E2E log has SHA-256 `d7b14cc92194247c3a784fdaaf4149aa87846a7cd8a026450c0d8a032eb256b8`; the native log has SHA-256 `1d336688bf62f5e55b0a59d57a3e2768616b8c280a2b73f616cd3c353ed8065d`. The unchanged runtime/test source diff from protected main `b6e3026` has SHA-256 `6a7908adfb4c3fe8eea6f2b56e44c48973cabc31110fa1ac82f989f79b2ec200`. Build, typecheck, unit and E2E logs, full input manifest, first failures, native records and verified archives are retained privately. Source-hosted and actual protected delivery remain pending. diff --git a/docs/status.md b/docs/status.md index 2725a6b0..4eca5403 100644 --- a/docs/status.md +++ b/docs/status.md @@ -163,7 +163,7 @@ before relying on a tick. - **Local draft destination fence** (#380, #381, #498). Final review found that an asynchronous local selection could accept input/send through its old non-local configuration before the target was pinned. Two controlled regressions failed; the repair reserves and fences only the source/new target, preserves the exact raw draft, and leaves unrelated Stop and editing available. All three focused Electron cases and full frozen build/typechecks/units pass (2,465 unit passes, 36 skips), followed by 511 desktop E2E passes with 11 skips and seven site passes. Protected [#498](https://github.com/TypeSafeAI/modex/pull/498) has since delivered this repair; its exact merge-group macOS check passed. The counts above retain their original candidate scope, and product local execution remains unadmitted. [Failure, repair and limits](reviews/2026-11-11-local-selection-fence.md). - **iPhone image-binding diagnostics** (#109, #498). The prior manifest collapsed container-query failures, realpath failures and image mismatches into app-image refusals. A diagnostic-only increment retains at most 16 callback/time-bound outcomes with sanitized error metadata and unchanged identity/command/stop guards. Six baseline controls fail; all 25 observer cases pass after the change. Full frozen build/typechecks/units pass with 2,471 passes, 36 skips and zero failures/cancellations. Fresh hosted observation remains required; no successful stack binding or older TLS cause is claimed. [Evidence and limits](reviews/2026-11-11-ios-image-binding-diagnostics.md). - **iPhone trust observer collection** (#498). Published `188af74` passed 44 iPhone tests with zero actual failures, but its observer stopped after six poll errors and unconfirmed command closure, with no callbacks/stacks captured. A predicate-only experiment narrows app/Security and trustd-peer logs while keeping every bound and identity guard. Native Foundation predicate replay goes from output-limit failure to 21 selected records with preserved app/trustd correlation; all 19 focused tests pass. Full build/typechecks and units passed with 2,465 passes, 36 skips and zero failures/cancellations. Fresh `aa095b2` app qualification passes 44 tests, but nine image-binding refusal entries yielded zero bound observers/stacks; five distinct callbacks in offline diagnostics completed normally. Live stack binding remains unqualified and the older trust-stall cause remains unknown. [Evidence and limits](reviews/2026-11-11-ios-trust-predicate.md). -- **Code Review revocation integration evidence** (#327). An owned candidate adds actual Electron/IPC accessible-to-revoked cases for 403/404/410, a held context response and an unsafe context-path boundary. Four focused revocation cases pass; a deliberate temporary 403-as-offline mutation fails with the private body still visible, and the exact restored production source passes all thirteen then-current regressions. The path case also passes, and fresh build/typechecks plus 2,570 units with 36 explicit skips pass. Full E2E passes 525 desktop cases with eleven explicit opt-in skips, eight site cases and four web cases, including all fourteen regressions. One fresh review is complete; an immediate denial-diagnostic assertion gap is corrected and all fourteen regressions pass again. Post-correction full E2E also passes 525 desktop cases with eleven skips, eight site cases and four web cases; the first source-hosted macOS run fails an existing human-question privacy scan on an atomic temporary-file rename, while all fourteen regressions pass. The follow-up closes the private app before the unchanged scan, follows the keyboard target’s associated details card and repairs a reproduced title-bar bug where an old Rename command opened editing on later chats. Three focused cases and all 22 complete app/human-question cases pass after rebuilding; fresh current-main full qualification and protected delivery remain pending. No full adversarial, live-provider, real-write or human acceptance is claimed. [Evidence and limits](reviews/2026-11-12-cr8-access-revocation.md). +- **Code Review revocation integration evidence** (#327). An owned candidate adds actual Electron/IPC accessible-to-revoked cases for 403/404/410, a held context response and an unsafe context-path boundary. Four focused revocation cases pass; a deliberate temporary 403-as-offline mutation fails with the private body still visible, and the exact restored production source passes all thirteen then-current regressions. The path case also passes, and fresh build/typechecks plus 2,570 units with 36 explicit skips pass. Full E2E passes 525 desktop cases with eleven explicit opt-in skips, eight site cases and four web cases, including all fourteen regressions. One fresh review is complete; an immediate denial-diagnostic assertion gap is corrected and all fourteen regressions pass again. Post-correction full E2E also passes 525 desktop cases with eleven skips, eight site cases and four web cases; the first source-hosted macOS run fails an existing human-question privacy scan on an atomic temporary-file rename, while all fourteen regressions pass. The follow-up closes the private app before the unchanged scan, follows the keyboard target’s associated details card and repairs a reproduced title-bar bug where an old Rename command opened editing on later chats. Independent follow-up review found no blocking defects, and both minor test improvements are implemented. The current-main build, typecheck, 2,579 units with 36 skips, all 22 affected cases and full E2E pass: 529 desktop cases with 17 skips, eight site cases and four web cases. Separate Claude Code 2.1.323 native qualification passes four ordinary checks and two intentional expected-failure controls, with three native starts and no unexpected failure. Fresh source-hosted checks, protected delivery and the final full-clause audit remain pending. No full adversarial, live-provider, real-write or human acceptance is claimed. [Evidence and limits](reviews/2026-11-12-cr8-access-revocation.md). - **Code Review native-modal investigation** (#498). Parent `fc593e0` timed out clicking Settings before Jev contrast collection; teardown then timed out and the job reached its 45-minute limit. The retained Electron stack is inside `NSAlert runModal`, with dialog message and cause unknown. A test-only candidate records bounded owned-child stderr and observes uncaught exceptions without handling them; five real-child controls and all eight accessibility cases pass locally. Full build/typechecks and units passed with 2,460 passes, 36 skips and zero failures/cancellations. Exact-head hosted qualification remains required; no causal repair or acceptance is claimed. [Observation and limits](reviews/2026-11-11-electron-modal-observation.md). - **Linux Debian source continuity** (#498). Candidate `188af74` acquired all four signed Noble pockets and installed host dependencies, then failed baseline Debian installation because `libnotify4` was not installable. The next candidate keeps explicit signed sources through both baseline and upgrade dependency resolution, preserving artifact verification, installed checks and the three-minute direct command bound. All 13 synthetic helper/wrapper cases and final corrected-source build/typechecks/units pass, with 2,465 passes, 36 skips and zero failures/cancellations. Fresh `aa095b2` hosted installed checks now pass eight Linux launches plus controlled KWallet5 and three Windows NSIS/DPAPI launches; original installer acceptance remains pending, including historical-schema, full graphical-login and real-account limits. [Failure, candidate and limits](reviews/2026-11-11-linux-debian-sources.md). - **Linux qualification host preparation** (#498). Candidate `5edbb84` passed required hosted macOS, iPhone and Windows checks, but both Linux attempts stopped at the 30-minute job limit during Azure Ubuntu mirror DNS failures before installed-app acceptance. The CI-only repair selects official signed Noble archive/security sources per APT invocation, bounds acquisition and the host step, and preserves the nine packages and downstream installed acceptance. Build passed; final full units passed with 2,427 passes, 35 skips and zero failures. Seven focused helper cases and independent review cover argument boundaries, failure propagation and owned temporary cleanup. Application/native inputs were unchanged by that CI-only repair, which has since landed through protected [#498](https://github.com/TypeSafeAI/modex/pull/498). Its later delivery is distinct from the historical host failures above; native account/graphical-session acceptance and product admission remain open. [Failure evidence, repair and limits](reviews/2026-11-11-linux-host-preparation.md). diff --git a/docs/superpowers/plans/2026-11-12-cr8-access-revocation.md b/docs/superpowers/plans/2026-11-12-cr8-access-revocation.md index 5cbfefe4..c95ee49f 100644 --- a/docs/superpowers/plans/2026-11-12-cr8-access-revocation.md +++ b/docs/superpowers/plans/2026-11-12-cr8-access-revocation.md @@ -67,3 +67,9 @@ Expected: applicable checks terminal zero and receipt names exact versions/revis ## Final whole-branch review After Task 1 completion, request one fresh read-only review of the entire signed branch range using the plan/spec, exact receipts and all ledger rulings. Re-grade findings by their actual effects; fix Important/Critical findings in one coalesced RED-to-GREEN pass with applicable green suites, defer Minors explicitly and do not request a second review. Hand over every ruling/cost and deferred Minor before preserving/moving only this plan’s own skill workspace. Source hosted checks, the protected queue and full literal criterion acceptance remain separate gates. + +## Observed hosted-failure follow-up + +The original test-only revocation slice remains as specified above. Its first hosted run exposed an existing atomic file-scan race; subsequent complete local validation exposed a global popup-locator ambiguity and a real title-bar rename-command defect. This authorized follow-up closes private test-app writers before unchanged privacy scans, follows the keyboard control's actual details-card association and consumes a Rename command only on the mounted chat title. A direct original-source regression proves the later-chat editing defect; the new command-counter guard repairs it without changing Code Review activation or provider policy. + +One independent follow-up review found no Critical or Important defect. Both Minor coverage suggestions were implemented: exact saved title/provenance preservation across blur and fresh menu/double-click/Enter editing on the later keyed title. Fresh current-main build/typecheck, 2,579 units with 36 skips, 529 desktop cases with 17 skips, eight site cases and four web cases pass. The separate installed Claude Code 2.1.323 boundary run passes four ordinary checks and two intentional expected-failure controls. First failures, the stale-build diagnostic mistake, scope limits and exact evidence are retained in the dated review receipt. Fresh source-hosted checks and actual protected delivery remain gates; no full adversarial or whole-issue acceptance is inferred from this plan update. diff --git a/docs/superpowers/specs/2026-11-12-cr8-access-revocation-design.md b/docs/superpowers/specs/2026-11-12-cr8-access-revocation-design.md index 29ab500c..d835636c 100644 --- a/docs/superpowers/specs/2026-11-12-cr8-access-revocation-design.md +++ b/docs/superpowers/specs/2026-11-12-cr8-access-revocation-design.md @@ -17,3 +17,9 @@ The same accepted adversarial clause also requires unsafe-path coverage. A sourc ## Verification Write the integration tests first. Verify the new offline branch initially fails its positive control; implement that fixture capability and rerun. Existing policy may already pass: do not invent a production repair. Run a controlled temporary production mutation classifying 403 as transient offline, verify the 403 integration case fails, restore exact production bytes and verify the clean suite. Preserve every first failure and negative-control output separately. Run fresh build/full units and full repository E2E, one fresh whole-slice review and at most one coalesced Important/Critical correction pass. Verify signed source, recovery and current hosted/protected checks before delivery. Reuse only byte-proven unchanged baseline evidence. + +## Observed hosted-failure follow-up + +The original test-only revocation slice remains as specified above. Its first hosted run exposed an existing atomic file-scan race; subsequent complete local validation exposed a global popup-locator ambiguity and a real title-bar rename-command defect. This authorized follow-up closes private test-app writers before unchanged privacy scans, follows the keyboard control's actual details-card association and consumes a Rename command only on the mounted chat title. A direct original-source regression proves the later-chat editing defect; the new command-counter guard repairs it without changing Code Review activation or provider policy. + +One independent follow-up review found no Critical or Important defect. Both Minor coverage suggestions were implemented: exact saved title/provenance preservation across blur and fresh menu/double-click/Enter editing on the later keyed title. Fresh current-main build/typecheck, 2,579 units with 36 skips, 529 desktop cases with 17 skips, eight site cases and four web cases pass. The separate installed Claude Code 2.1.323 boundary run passes four ordinary checks and two intentional expected-failure controls. First failures, the stale-build diagnostic mistake, scope limits and exact evidence are retained in the dated review receipt. Fresh source-hosted checks and actual protected delivery remain gates; no full adversarial or whole-issue acceptance is inferred from this plan update.