From 1b2c58b155d188e372b5647c46a5e93f55c46115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=20Alexander=20=F0=9F=91=91?= Date: Fri, 13 Nov 2026 02:34:15 -0600 Subject: [PATCH 1/2] fix(code-review): repair human seed and panel focus --- apps/desktop/e2e/code-review-agent.spec.ts | 38 ++++++++++ .../src/renderer/code-review/PrPane.tsx | 21 +++++- .../test/code-review-human-seed.test.ts | 75 +++++++++++++++++++ .../test/fixtures/code-review-gh-world.ts | 8 +- .../test/fixtures/code-review-human-world.ts | 74 ++++++++++++++++++ .../2026-10-22-cr8-voiceover/checklist.md | 51 ++++--------- .../reviews/2026-10-22-cr8-voiceover/seed.mjs | 10 ++- docs/reviews/2026-11-02-v0.5.0-val-session.md | 70 ++++++----------- .../reviews/2026-11-13-cr-human-seed-focus.md | 37 +++++++++ .../2026-11-13-cr-technical-acceptance.md | 39 ++++++++++ docs/status.md | 8 +- 11 files changed, 339 insertions(+), 92 deletions(-) create mode 100644 apps/desktop/test/code-review-human-seed.test.ts create mode 100644 apps/desktop/test/fixtures/code-review-human-world.ts create mode 100644 docs/reviews/2026-11-13-cr-human-seed-focus.md create mode 100644 docs/reviews/2026-11-13-cr-technical-acceptance.md diff --git a/apps/desktop/e2e/code-review-agent.spec.ts b/apps/desktop/e2e/code-review-agent.spec.ts index bea849cd..1bbc9067 100644 --- a/apps/desktop/e2e/code-review-agent.spec.ts +++ b/apps/desktop/e2e/code-review-agent.spec.ts @@ -79,6 +79,44 @@ const runs = () => h.providerStarts().filter((line) => line.startsWith("claude - const panel = (p: Page) => tid(p, "cr-agent-panel"); const section = (p: Page) => tid(p, "cr-agent"); +test("closing header review and merge panels returns keyboard focus to their own opener", async () => { + h = await launchWithGh(baseWorld()); + const page = await openLending(); + await tid(page, "code-review-split-toggle").click(); + await expect(tid(page, "code-review-workspace")).toHaveAttribute("data-panes", "overview changes"); + for (const pane of ["overview", "changes"] as const) { + const root = tid(page, `code-review-pane-${pane}`); + for (const [buttonId, panelId] of [["code-review-review", "cr-agent-panel"], ["code-review-merge", "cr-merge"]] as const) { + const opener = root.getByTestId(buttonId); + await expect(opener).not.toHaveAttribute("aria-disabled", "true"); + await opener.focus(); + await page.keyboard.press("Enter"); + const surface = root.getByTestId(panelId); + await expect(surface).toBeVisible(); + const close = surface.getByRole("button", { name: "Close", exact: true }); + await close.focus(); + await page.keyboard.press("Enter"); + await expect(surface).toHaveCount(0); + await expect(opener).toBeFocused(); + await page.keyboard.press("Enter"); + await expect(surface).toBeVisible(); + // The header's instructions popover owns its own Escape; it must not close the underlying panel. + const gear = root.getByTestId("code-review-instructions"); + await gear.click(); + await expect(page.getByRole("dialog", { name: "Review instructions" })).toBeVisible(); + await page.keyboard.press("Escape"); + await expect(surface).toBeVisible(); + await expect(gear).toBeFocused(); + await surface.getByRole("button", { name: "Close", exact: true }).focus(); + await page.keyboard.press("Escape"); + await expect(surface).toHaveCount(0); + await expect(opener).toBeFocused(); + } + } + expect(runs()).toEqual([]); + expect(h.posts()).toEqual([]); +}); + test("the instructions popover states its scope, saves a version on this Mac only, survives a reload, and starts nothing", async () => { h = await launchWithGh(baseWorld()); installClaude("reply"); diff --git a/apps/desktop/src/renderer/code-review/PrPane.tsx b/apps/desktop/src/renderer/code-review/PrPane.tsx index 47a09a79..b1d9ed22 100644 --- a/apps/desktop/src/renderer/code-review/PrPane.tsx +++ b/apps/desktop/src/renderer/code-review/PrPane.tsx @@ -57,11 +57,18 @@ function useScrollMemory(ref: RefObject, id: string, content * overview renders #323's read-only content; #324 supplies revision-bound remote diffs and the file tree. */ export function PrPane({ pane, changesViews, pr, keyId, changesWidth, treeWidth, busy, pinned, caps, onPin, onRetry, onShowChanges, onActivityPage, contextBusy, onTreeResize, onTreeReset, writes, agent }: Props) { + const paneElement = useRef(null); const body = useRef(null); const tree = useRef(null); const [filesShown, setFilesShown] = useState(false); // At most one panel under the header: Merge, a state change picked from the state menu, or an agent review. const [panel, setPanel] = useState<"merge" | "agent" | PrStateChange | null>(null); + const closeHeaderPanel = () => { + const opener = panel === "agent" ? "code-review-review" : "code-review-merge"; + setPanel(null); + // Each split pane has its own header: return to the button that opened this panel. + paneElement.current?.querySelector(`[data-testid="${opener}"]`)?.focus(); + }; const overview = pr.overview; const loaded = overview && overview.state !== "unavailable" ? overview.value : null; const merge = writes && loaded ? { writes, overview: loaded, open: panel === "merge", onToggle: () => setPanel((v) => v === "merge" ? null : "merge"), onState: (to: PrStateChange) => setPanel(to) } : null; @@ -74,10 +81,18 @@ export function PrPane({ pane, changesViews, pr, keyId, changesWidth, treeWidth, : null; const status = !overview ?

{busy ? "Loading the pull request…" : "Not loaded yet."}

: notice; return ( -
+
{ + if (event.key === "Escape" && (panel === "agent" || panel === "merge") && event.target instanceof Element + && event.target.closest('[data-testid="cr-agent-panel"], [data-testid="cr-merge"]')) { + event.preventDefault(); + event.stopPropagation(); + closeHeaderPanel(); + } + }}> setFilesShown((v) => !v) } : null} /> - {review && panel === "agent" && setPanel(null)} onReload={onRetry} />} - {merge && panel === "merge" && setPanel(null)} onMerged={onRetry} />} + {review && panel === "agent" && } + {merge && panel === "merge" && } {merge && panel && panel !== "merge" && panel !== "agent" && setPanel(null)} onDone={onRetry} />} {pane === "overview" &&
{status ?? } diff --git a/apps/desktop/test/code-review-human-seed.test.ts b/apps/desktop/test/code-review-human-seed.test.ts new file mode 100644 index 00000000..a50060e6 --- /dev/null +++ b/apps/desktop/test/code-review-human-seed.test.ts @@ -0,0 +1,75 @@ +import { test } from "node:test"; +import assert from "node:assert/strict"; +import { execFileSync } from "node:child_process"; +import fs from "node:fs"; +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import { ghTransport } from "../src/main/engine/code-review/gh.js"; +import { CodeReviewService } from "../src/main/engine/code-review/read-service.js"; +import type { CodeReviewRequest, PrActivity, PrCheck, PrFiles, PrKey, PrOverview, PrStack, ReadResult } from "../src/shared/code-review.js"; + +function ready(result: ReadResult): T { + assert.equal(result.state, "ready", JSON.stringify(result)); + return (result as { value: T }).value; +} + +// Catches the human seed reverting to baseWorld: its overview has no description and its +// activity/checks/stack/second diff reads fail despite the checklist asking a person to use them. +test("the human seed supports populated overview, paged activity, checks, stack and both diffs through real gh reads", async (t) => { + const desktop = fileURLToPath(new URL("../../", import.meta.url)); + const root = fs.mkdtempSync(path.join(os.tmpdir(), "modex-cr-human-seed-")); + t.after(() => fs.rmSync(root, { recursive: true, force: true })); + execFileSync(process.execPath, [path.resolve(desktop, "../../docs/reviews/2026-10-22-cr8-voiceover/seed.mjs"), root], { cwd: desktop }); + const changes = { FAKE_GH_WORLD: path.join(root, "gh-world.json"), FAKE_GH_LOG: path.join(root, "gh-calls.log"), FAKE_GH_HOLDS: path.join(root, "holds"), GH_CONFIG_DIR: path.join(root, "gh-config") }; + const original = Object.fromEntries(Object.keys(changes).map(k => [k, process.env[k]])); + Object.assign(process.env, changes); + t.after(() => { for (const [key, value] of Object.entries(original)) { if (value === undefined) delete process.env[key]; else process.env[key] = value; } }); + const service = new CodeReviewService({ enabled: true, transport: ghTransport(path.join(root, "bin", "gh")) }); + let request = 0; + type Ask = CodeReviewRequest extends infer R ? R extends CodeReviewRequest ? Omit : never : never; + const read = async (ask: Ask) => { const reply = await service.read({ ...ask, requestId: `human-${++request}` }); assert.ok(reply); return reply.result; }; + await read({ op: "connection" }); + await read({ op: "inbox", query: "" }); + const key: PrKey = { account: "1001", host: "github.com", repoId: "7301", number: 73 }; + const overview = ready(await read({ op: "overview", key })); + assert.match(overview.body, /## What changes/); + assert.ok(overview.body.length > 2000, "a long Markdown description for the scrolling journey"); + assert.deepEqual(overview.totals, { files: 11, additions: 8912, deletions: 47, commits: 1 }); + const first = await read({ op: "activity", key, cursor: null }); + const activity = ready(first); + assert.equal(first.state === "ready" && first.coverage?.next, "p2", "Load more activity must be reachable"); + const last = await read({ op: "activity", key, cursor: "p2" }); + const all = [...activity, ...ready(last)]; + assert.equal(last.state === "ready" && last.coverage?.complete, true); + assert.equal(all.filter(a => a.kind === "comment").length, 101); + assert.equal(new Set(all.map(a => a.id)).size, all.length); + assert.ok(all.some(a => a.kind === "deployment" && a.status === "success" && a.url === "https://example.test/preview/73")); + const checks = ready(await read({ op: "checks", key, revision: overview.revision })); + assert.equal(checks.length, 5); + assert.ok(checks.some(c => c.conclusion === "failure")); + assert.ok(checks.some(c => c.status === "running")); + assert.equal(ready(await read({ op: "stack", key })).source, "inferred"); + const files = ready(await read({ op: "files", key, revision: overview.revision, cursor: null })).files; + assert.equal(files.length, 11); + assert.equal(files.reduce((n, f) => n + f.additions, 0), 8912); + assert.equal(files.reduce((n, f) => n + f.deletions, 0), 47); + assert.ok(files.some(f => f.path === "src/holds/move.ts" && f.patch.kind === "text" && /\n /.test(f.patch.patch) && /\n-/.test(f.patch.patch) && /\n\+/.test(f.patch.patch))); + const fieldKey: PrKey = { ...key, repoId: "7302", number: 91 }; + const field = ready(await read({ op: "overview", key: fieldKey })); + const fieldFiles = ready(await read({ op: "files", key: fieldKey, revision: field.revision, cursor: null })).files; + assert.equal(fieldFiles.length, 4); + assert.deepEqual(fieldFiles.reduce((sum, f) => [sum[0]! + f.additions, sum[1]! + f.deletions], [0, 0]), [11, 4]); + for (const other of [{ ...key, number: 70 }, { ...fieldKey, number: 73 }]) { + const meta = ready(await read({ op: "overview", key: other })); + const listed = ready(await read({ op: "files", key: other, revision: meta.revision, cursor: null })).files; + assert.equal(listed.length, meta.totals.files, `listed PR ${other.repoId}#${other.number} must not open an incomplete fixture`); + assert.equal(listed.reduce((n, f) => n + f.additions, 0), meta.totals.additions); + assert.equal(listed.reduce((n, f) => n + f.deletions, 0), meta.totals.deletions); + ready(await read({ op: "activity", key: other, cursor: null })); + ready(await read({ op: "checks", key: other, revision: meta.revision })); + ready(await read({ op: "stack", key: other })); + } + assert.doesNotMatch(fs.readFileSync(path.join(root, "gh-calls.log"), "utf8"), /^(POST|PUT|PATCH|DELETE) /m); + assert.equal(fs.readFileSync(path.join(root, "provider-calls.log"), "utf8"), ""); +}); diff --git a/apps/desktop/test/fixtures/code-review-gh-world.ts b/apps/desktop/test/fixtures/code-review-gh-world.ts index 48b787f3..99b34ebc 100644 --- a/apps/desktop/test/fixtures/code-review-gh-world.ts +++ b/apps/desktop/test/fixtures/code-review-gh-world.ts @@ -54,14 +54,20 @@ 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" }; const mergedAs = (pullRoute) => posts().find((p) => p.endpoint === pullRoute + "/merge"); +let pagingHeaders = {}; function send(status, body, headers) { - const all = { "Content-Type": "application/json; charset=utf-8", "X-Ratelimit-Remaining": "4999", ...(headers || {}) }; + const all = { "Content-Type": "application/json; charset=utf-8", "X-Ratelimit-Remaining": "4999", ...pagingHeaders, ...(headers || {}) }; process.stdout.write("HTTP/2.0 " + status + " " + (reason[status] || "Error") + "\n" + Object.entries(all).map(([k, v]) => k + ": " + v).join("\r\n") + "\r\n\r\n" + (typeof body === "string" ? body : JSON.stringify(body))); if (status >= 300) process.exitCode = 1; } function paged(list) { const per = Number(params.get("per_page") || 30), page = Number(params.get("page") || 1); + if (page * per < list.length) { + const next = new URLSearchParams(params); + next.set("page", String(page + 1)); + pagingHeaders = { Link: '; rel="next"' }; + } return list.slice((page - 1) * per, page * per); } // Recorded changes to a PR, applied in order to what the world says about it. diff --git a/apps/desktop/test/fixtures/code-review-human-world.ts b/apps/desktop/test/fixtures/code-review-human-world.ts new file mode 100644 index 00000000..6af349ff --- /dev/null +++ b/apps/desktop/test/fixtures/code-review-human-world.ts @@ -0,0 +1,74 @@ +import { baseWorld, ghFile, sha, type GhWorld } from "./code-review-gh-world.js"; + +/** Complete, synthetic read data for the person-run keyboard/VoiceOver checklist, not acceptance results. */ +export function humanWorld(): GhWorld { + const world = baseWorld(); + const lending = "repos/example-org/lending", field = "repos/example-org/field-guide"; + const body = `This is a synthetic pull request for the person-run Code Review checklist. No library, account, deployment or result described here is real. + +## What changes + +Moving a hold to another pickup branch should preserve its original request time and queue position. The old implementation cancelled the hold and created another, putting the member behind requests received later. This change keeps the same hold and replaces only its pickup branch. + +- **Identity:** keep the hold id so existing receipts and notifications still refer to the same request. +- **Ordering:** retain requestedAt, including ties between requests received during the same minute. The branch transfer must never become a new request. +- **Availability:** validate the target branch before making any change. A closed branch returns an explanation and leaves the original hold untouched. +- **Notifications:** describe the new pickup location without promising that an item is ready before it arrives. +- **Recovery:** a failed transfer leaves the original branch, identifier and timestamp together. Retrying after a failure must not create a second hold. +- **History:** show the old and new pickup branches in the transfer receipt so a member can explain a discrepancy to the desk. + +## How to read this fixture + +The first changed file has context, removed and added lines for the accessibility journey. Eight small text files in separate nested folders supply separate file headings and enough tree entries to exercise independent scrolling. A large generated text file has intentionally omitted patch content; the UI must label the missing patch rather than claim all lines are present. The last file is a binary image with no textual patch. The eleven file records total +8,912 and −47, matching the pull request metadata. + +## Activity and checks + +There are 101 made-up comments across two REST pages. Use Load more activity to reach the final comment. Check runs deliberately include success, failure and an in-progress result, and a separate commit status is pending. None is a real CI receipt or evidence that this synthetic change could merge. The preview destination uses example.test and must be activated explicitly; it comes from a synthetic deployment record rather than a comment link. + +## Limits + +The inferred stack is derived from these made-up base and head branches. It is not an authoritative dependency declaration. No native coding provider is available in this home: the provider executables record their arguments and refuse execution. Human VoiceOver observations, reduced-motion behavior and live review or write acceptance must be recorded separately by the person who performs them. +`; + world.routes[`${lending}/pulls/73`] = { ...world.routes[`${lending}/pulls/73`] as object, body, comments: 101 }; + world.routes[`${field}/pulls/91`] = { ...world.routes[`${field}/pulls/91`] as object, body: "## Grouping branch pages\n\nSynthetic region grouping with four changed files, +11 and −4. No live data or deployment." }; + world.routes[`${lending}/issues/73/timeline`] = Array.from({ length: 101 }, (_, i) => ({ + id: 9100 + i, event: "commented", user: { id: 1002, login: "grace-fixture", type: "User" }, + created_at: new Date(Date.parse("2026-10-18T18:00:00Z") + i * 60_000).toISOString(), + body: `Human checklist activity ${i + 1}: preserve the hold's original queue position.`, + })); + world.routes[`${lending}/deployments`] = [{ id: 8301, sha: sha("c"), environment: "preview", created_at: "2026-10-18T20:32:00Z" }]; + world.routes[`${lending}/deployments/8301/statuses`] = [{ id: 8302, state: "success", environment_url: "https://example.test/preview/73" }]; + const checkRun = (id: number, name: string, conclusion: string | null) => ({ + id, name, head_sha: sha("c"), status: conclusion ? "completed" : "in_progress", conclusion, + app: { slug: "github-actions" }, started_at: "2026-10-18T20:31:00Z", completed_at: conclusion ? "2026-10-18T20:35:00Z" : null, + html_url: `https://github.com/example-org/lending/runs/${id}`, + }); + world.routes[`${lending}/commits/${sha("c")}/check-runs`] = { total_count: 4, check_runs: [ + checkRun(8101, "unit + e2e (macOS)", "success"), checkRun(8102, "typecheck", "success"), checkRun(8103, "lint", "failure"), checkRun(8104, "package", null), + ] }; + world.routes[`${lending}/commits/${sha("c")}/status`] = { total_count: 1, statuses: [{ id: 8201, context: "preview/deploy", state: "pending", creator: { id: 1003, login: "deploy-bot", type: "User" }, created_at: "2026-10-18T20:32:00Z", updated_at: "2026-10-18T20:32:00Z", target_url: "https://example.test/preview/73" }] }; + world.routes[`${lending}/pulls/73/files`] = [ + ghFile("src/holds/move.ts", "@@ -1,3 +1,4 @@\n export function moveHold(hold, branch) {\n- return createHold(branch);\n+ // Preserve the request identity and queue position.\n+ return { ...hold, pickupBranch: branch };\n }", 2, 1), + ...Array.from({ length: 8 }, (_, i) => ghFile(`src/holds/transfer-${i + 1}/queue/identity/history/receipts/step.ts`, `@@ -0,0 +1 @@\n+export const transferStep${i + 1} = true;`, 1, 0, "added")), + ghFile("generated/hold-index.txt", null, 8902, 46), + ghFile("assets/shelf.png", null, 0, 0, "added"), + ]; + world.routes[`${field}/pulls/91/files`] = [ + ghFile("src/branches/regions.ts", "@@ -1,4 +1,7 @@\n import { Branch } from \"./branch\";\n-export const regions = [\"north\", \"south\"];\n-export function groupByRegion(branches: Branch[]) { return branches; }\n+export const regions = [\"north\", \"south\", \"east\", \"west\"] as const;\n+export type Region = (typeof regions)[number];\n+export function groupByRegion(branches: Branch[]): Map {\n+ return new Map(regions.map((region) => [region, branches.filter((b) => b.region === region)]));\n+}\n export const DEFAULT_REGION = \"north\";", 5, 2), + ghFile("src/branches/index.ts", "@@ -2,3 +2,5 @@\n export { Branch } from \"./branch\";\n-export { regions } from \"./regions\";\n+export { regions, groupByRegion } from \"./regions\";\n+export type { Region } from \"./regions\";\n+export { BranchList } from \"../pages/branch-list\";\n export { openingHours } from \"./hours\";", 3, 1), + ghFile("src/pages/branch-list.tsx", "@@ -8,4 +8,5 @@ export function BranchList({ branches }: Props) {\n return (\n-
    {branches.map((b) =>
  • {b.name}
  • )}
\n+ <>{[...groupByRegion(branches)].map(([region, list]) =>

{region}

\n+
    {list.map((b) =>
  • {b.name}
  • )}
)}\n );\n }", 2, 1), + ghFile("docs/branches.md", "@@ -1,2 +1,3 @@\n # Branches\n+Branch pages are grouped by region: north, south, east and west.\n Each branch page lists its opening hours.", 1, 0), + ]; + // Complete the other listed PRs too, so keyboard navigation does not land on fixture-only 404s. + for (const [repo, numbers] of [[lending, [73, 70]], [field, [91, 73]]] as const) { + world.routes[`${repo}/pulls`] = numbers.map(n => world.routes[`${repo}/pulls/${n}`]); + for (const n of numbers) { + world.routes[`${repo}/issues/${n}/timeline`] ??= []; + world.routes[`${repo}/pulls/${n}/files`] ??= n === 70 ? [ghFile("hours.ts", "@@ -1 +1,2 @@\n-old\n+first\n+second", 2, 1), ghFile("hours.md", "@@ -0,0 +1 @@\n+Opening hours are printed on hold slips.", 1, 0, "added")] : [ghFile("anchors.md", "@@ -1,2 +1,5 @@\n-old\n-anchor\n+one\n+two\n+three\n+four\n+five", 5, 2)]; + } + world.routes[`${repo}/deployments`] ??= []; + world.routes[`${repo}/commits/${sha("c")}/check-runs`] ??= { total_count: 0, check_runs: [] }; + world.routes[`${repo}/commits/${sha("c")}/status`] ??= { total_count: 0, statuses: [] }; + } + return world; +} diff --git a/docs/reviews/2026-10-22-cr8-voiceover/checklist.md b/docs/reviews/2026-10-22-cr8-voiceover/checklist.md index 2a09f21d..3accda07 100644 --- a/docs/reviews/2026-10-22-cr8-voiceover/checklist.md +++ b/docs/reviews/2026-10-22-cr8-voiceover/checklist.md @@ -1,44 +1,25 @@ # Keyboard and VoiceOver review of Code Review, 2026-10-22 -This is the human gate for [#327](https://github.com/TypeSafeAI/modex/issues/327) (CR-8) and for -[#322](https://github.com/TypeSafeAI/modex/issues/322) AC4. A person drives the Code Review surface with -the keyboard alone, then with VoiceOver, and records what they hear. The automated checks in -`e2e/code-review-a11y.spec.ts` and `e2e/code-review-navigation.spec.ts` measure contrast, Tab reach, focus -rings and Escape. They do not replace this review. The -[acceptance matrix](../2026-10-22-cr8-acceptance-matrix.md) lists this gate as open until it is filled in. - -It covers what CR-3 built: the inbox, the PR and Changes tabs, the header actions, the split and the dividers, -and, since the overview (#323) and the diff and file tree (#324) landed, parts C and D for the populated panes. -The review panel and instructions popover (#325) and the GitHub writes (#326) have landed too; their rows stay -listed at the end for their own issues' acceptance and are not part of #322 AC4. - -**Build:** `main` at `afec85b` (#438, the CR-3 acceptance follow-up) or later, built with `pnpm build`. On -2026-10-30 `main` was `f51ef7e`; the automated half of this gate was re-run there -([resume record](../2026-10-30-cr3-acceptance-resume.md)). On 2026-11-01 it was re-run on `0a8c513`, the seed was -rebuilt there and its launch line opened the app ([matrix refresh](../2026-11-01-cr8-acceptance-matrix.md)). Record the SHA you used. The automated half's first run -is in [the CR-3 acceptance record](../2026-10-28-cr3-acceptance.md). +This is the human gate for [#327](https://github.com/TypeSafeAI/modex/issues/327) (CR-8) and for [#322](https://github.com/TypeSafeAI/modex/issues/322) AC4. A person drives the Code Review surface with the keyboard alone, then with VoiceOver, and records what they hear. The automated checks in `e2e/code-review-a11y.spec.ts` and `e2e/code-review-navigation.spec.ts` measure contrast, Tab reach, focus rings and Escape. They do not replace this review. The [acceptance matrix](../2026-10-22-cr8-acceptance-matrix.md) lists this gate as open until it is filled in. + +It covers what CR-3 built: the inbox, the PR and Changes tabs, the header actions, the split and the dividers, and, since the overview (#323) and the diff and file tree (#324) landed, parts C and D for the populated panes. The review panel and instructions popover (#325) and the GitHub writes (#326) have landed too; their rows stay listed at the end for their own issues' acceptance and are not part of #322 AC4. + +**Build:** `main` at `afec85b` (#438, the CR-3 acceptance follow-up) or later, built with `pnpm build`. On 2026-10-30 `main` was `f51ef7e`; the automated half of this gate was re-run there ([resume record](../2026-10-30-cr3-acceptance-resume.md)). On 2026-11-01 it was re-run on `0a8c513`, the seed was rebuilt there and its launch line opened the app ([matrix refresh](../2026-11-01-cr8-acceptance-matrix.md)). Record the SHA you used. The automated half's first run is in [the CR-3 acceptance record](../2026-10-28-cr3-acceptance.md). ## Setup (about 3 minutes) -Use synthetic data and no GitHub login. The same harness as the `F-prod` specs: a throwaway home, a -synthetic `gh` first on PATH, and no tokens. The person's own `gh` login is never read. +Use synthetic data and no GitHub login. The same harness as the `F-prod` specs: a throwaway home, a synthetic `gh` first on PATH, and no tokens. The person's own `gh` login is never read. ```sh # from apps/desktop, in a worktree at the SHA under test, after pnpm build node ../../docs/reviews/2026-10-22-cr8-voiceover/seed.mjs /tmp/modex-cr8-voiceover # prints the command to run ``` -The script writes the home, the synthetic `gh` and its world (the journey's three authored PRs and one to -review, all made up), and prints an `env … npx electron .` line. Since 2026-11-01 it also puts recorder `claude` -and `codex` executables first on PATH: they log to `provider-calls.log` and exit 1, so nothing in this home reaches -your own Claude login or a provider. Run that line, then: +The script writes the home, the synthetic `gh` and its world (the journey's three authored PRs and one to review, all made up), and prints an `env … pnpm exec electron .` line. Since 2026-11-01 it also puts recorder `claude` and `codex` executables first on PATH: they log to `provider-calls.log` and exit 1, so nothing in this home reaches your own Claude login or a provider. Run that line, then: -1. From the v0.5.0 candidate on, Code Review is in the rail by default. On an older SHA, open DevTools (View → Toggle Developer Tools), run `localStorage.setItem("modex.codeReview", "on")` and reload (Command-R). +1. Built apps hide Code Review by default (#492). In this disposable home, open Settings → General and tick **Show Code Review in the rail**. This is an explicit local opt-in for the review; it does not approve default activation or change your installed app’s profile. 2. Make the window about 1440×900. -3. Part A runs with VoiceOver off. Part B runs with VoiceOver on (Command-F5; VO = Control-Option). - Parts C and D run with VoiceOver on. Repeat A1–A6, C1–C3 and D1–D4 at about 900×600 and note - anything that differs: the split folds to one pane there, and the file tree sits behind the - **Show changed files** toggle in the Changes header. +3. Part A runs with VoiceOver off. Part B runs with VoiceOver on (Command-F5; VO = Control-Option). Parts C and D run with VoiceOver on. Repeat A1–A6, C1–C3 and D1–D4 at about 900×600 and note anything that differs: the split folds to one pane there. When the active Changes pane is too narrow for the tree beside the diff, use **Show changed files** in its header; the fold depends on the pane’s available width, not the window width alone. ## A. Keyboard only (no mouse or trackpad) @@ -47,8 +28,8 @@ your own Claude login or a provider. Run that line, then: | A1 | Tab to the rail's **Code Review** button and press Return | The inbox opens: "Code Review", **Inbox actions**, the search field, then "Authored by me" and "Needs my review" | | | A2 | Tab into the list, then use Down, Up, Home and End | One Tab stop for the whole list; the arrow keys move between rows; each row shows a focus ring | | | A3 | Press Return on "Move holds between branches…" | The PR opens: the PR tab and the **Changes +8,912 −47** tab appear in the title bar; the header reads "Open", "lending #73" | | -| A4 | Keep pressing Tab | Pin, Copy link, Open in GitHub, Review with Claude, Review instructions and Merge, then the title bar's PR tab, its close, Changes and its close, New tab, and the split button. **Note:** the title-bar tabs come after the header, though they are drawn above it. Record whether that order is acceptable. | | -| A5 | On **New tab**, press Return and Space. Then on **Review with Claude**, **Review instructions** and **Merge**, press Return | New tab does nothing and says why it isn't available (tooltip); focus stays put. The other three open their panel or popover (they have landed, #325 and #326), and Close or Escape returns focus to the button. Don't press Start or confirm anything here; those rows belong to #325 and #326 below | | +| A4 | Keep pressing Tab | Pin, Copy link, Open in GitHub, Review with Claude, Review instructions and Merge, then the title bar's PR tab, its close, Changes and its close, and the split button. **Note:** the title-bar tabs come after the header, though they are drawn above it. Record whether that order is acceptable. | | +| A5 | Focus **Review with Claude** and press Return; then activate **Review instructions** and **Merge**, closing each panel or popover | Each opens its panel or popover; Close or Escape returns focus to the initiating button. Review can open before main probes provider availability; the recorder refuses execution if a start is attempted. Do not press Start, confirm a merge or send any write here. Live review start/Stop and write acceptance stay with #325 and #326 below | | | A6 | Tab to the split button and press Return; then Tab to the divider between the panes and press Left/Right (Shift for larger steps) | Changes opens beside the PR. The divider moves and its value changes. It stops at each pane's minimum. | | | A7 | Inbox actions → Return → Escape | The menu opens with **Refresh** focused; Escape closes it and returns focus to **Inbox actions** | | | A8 | Open the second PR, then use the title bar's Back and Forward | Each PR returns as you left it (split or not), without a loading spinner | | @@ -72,7 +53,7 @@ your own Claude login or a provider. Run that line, then: ## C. The overview (#323), keyboard and VoiceOver -Open "Move holds between branches…" first. Its body is long enough to scroll. +Open "Move holds between branches…" first. Its synthetic body is long enough to scroll; its 101 comments span two REST pages. Checks include success, failure and pending states, and the provider deployment links to example.test. These are made-up inputs, not real CI or deployment evidence. | # | Do | Expect | Pass? Notes | | --- | --- | --- | --- | @@ -84,9 +65,7 @@ Open "Move holds between branches…" first. Its body is long enough to scroll. ## D. Changes: the diff and the file tree (#324), keyboard and VoiceOver -Press Right on the PR tab, or activate **Changes**. At 900×600, the tree is behind the **Show changed files** -toggle in the Changes header (it becomes **Show the diff** while the tree is up); at 1440×900 it sits to the -right of the diff. +Press Right on the PR tab, or activate **Changes**. When there is room, the tree sits beside the diff. When the active Changes pane is narrow, use **Show changed files** in the header (it becomes **Show the diff** while the tree is up). Record the actual pane arrangement at each window size. | # | Do | Expect | Pass? Notes | | --- | --- | --- | --- | @@ -94,7 +73,7 @@ right of the diff. | D2 | On a file heading press Return, then VO-Right into the patch | The hunk reads line by line with its old and new line numbers; a context line, an added line and a removed line can be told apart by what is read, not by colour | | | D3 | With VO off: focus a file heading, then press PageDown; then scroll the inbox with the wheel | Only the diff scrolls on PageDown; the inbox scroll does not move the diff or take the focus from the heading | | | D4 | Tab into the tree's filter field ("Filter remote files"), type `move`, then Tab to the file ("View remote diff for src/holds/move.ts") and press Return | The tree narrows to the match; Return moves the diff to that file's section and focuses it; the tree keeps its own scroll position | | -| D5 | Tab back into the tree and scroll it with PageDown | Only the tree scrolls; the diff stays where D4 left it | | +| D5 | Return to the tree, activating **Show changed files** again if the narrow pane folded it after selection. Clear **Filter remote files**, focus a visible tree file without activating it, then press PageDown | The full eleven-file fixture has nested folders so the tree can scroll. Only the tree scrolls; the diff and inbox stay where D4 left them. Do not count focus-induced scrolling or a one-row filtered result as this check | | | D6 | Switch to the PR tab and back to Changes | The diff, the tree and the inbox are each where you left them; the file you chose is still marked current | | ## Not part of #322 (owned by their own issues) @@ -104,6 +83,8 @@ right of the diff. | #325 review | R3's instructions popover: its scope line, Escape returns focus to the gear; review start, stop and progress announced | | #326 writes | Confirmation dialogs; submit announced once; reconciliation state after an uncertain write | +The C07 new-tab control was removed by Val’s 2026-11-04 decision. Its old unavailable-button steps are no longer part of A4/A5. This procedure repair records no human pass. The recorder providers refuse execution, so live review start/Stop acceptance and live write acceptance need their separately authorized procedures. + ## Result | Reviewer | Date | SHA | macOS / VoiceOver | Outcome | diff --git a/docs/reviews/2026-10-22-cr8-voiceover/seed.mjs b/docs/reviews/2026-10-22-cr8-voiceover/seed.mjs index 7c71fa4a..ef122a56 100644 --- a/docs/reviews/2026-10-22-cr8-voiceover/seed.mjs +++ b/docs/reviews/2026-10-22-cr8-voiceover/seed.mjs @@ -14,7 +14,8 @@ const root = path.resolve(process.argv[2] ?? ""); if (!process.argv[2] || (fs.existsSync(root) && fs.readdirSync(root).length)) throw new Error("pass an empty directory"); const fixture = path.resolve("dist/test/fixtures/code-review-gh-world.js"); if (!fs.existsSync(fixture)) throw new Error("run from apps/desktop after pnpm build"); -const { baseWorld, WORLD_GH } = await import(pathToFileURL(fixture).href); +const { WORLD_GH } = await import(pathToFileURL(fixture).href); +const { humanWorld } = await import(pathToFileURL(path.resolve("dist/test/fixtures/code-review-human-world.js")).href); const home = path.join(root, "home"), repo = path.join(root, "review-repo"); const bin = path.join(root, "bin"), config = path.join(root, "gh-config"), holds = path.join(root, "holds"); @@ -34,14 +35,15 @@ fs.writeFileSync(path.join(bin, "gh"), WORLD_GH, { mode: 0o755 }); const recorder = `#!/bin/sh\nprintf '%s %s\\n' "$(basename "$0")" "$*" >> '${path.join(root, "provider-calls.log").replace(/'/g, "'\\''")}'\nexit 1\n`; for (const cli of ["claude", "codex"]) fs.writeFileSync(path.join(bin, cli), recorder, { mode: 0o755 }); fs.writeFileSync(path.join(root, "provider-calls.log"), ""); -fs.writeFileSync(path.join(root, "gh-world.json"), JSON.stringify(baseWorld())); +fs.writeFileSync(path.join(root, "gh-world.json"), JSON.stringify(humanWorld())); fs.writeFileSync(path.join(root, "gh-calls.log"), ""); fs.writeFileSync(path.join(config, "hosts.yml"), "github.com:\n user: ada-fixture\n git_protocol: https\n"); const q = (s) => `'${s.replace(/'/g, "'\\''")}'`; console.log([ - "env -u GH_TOKEN -u GITHUB_TOKEN -u MODEX_E2E -u MODEX_DEMO", + "env -u GH_TOKEN -u GITHUB_TOKEN -u GH_ENTERPRISE_TOKEN -u GITHUB_ENTERPRISE_TOKEN -u MODEX_E2E -u MODEX_DEMO", `MODEX_HOME=${q(home)} MODEX_NO_LOGIN_PATH=1 GH_CONFIG_DIR=${q(config)}`, + `JEV_API_KEY='' TYPESAFE_API_KEY='' JEV_CONFIG=${q(path.join(home, "no-jev.json"))}`, `FAKE_GH_WORLD=${q(path.join(root, "gh-world.json"))} FAKE_GH_LOG=${q(path.join(root, "gh-calls.log"))} FAKE_GH_HOLDS=${q(holds)}`, - `PATH=${q(bin)}:"$PATH" npx electron .`, + `PATH=${q(bin)}:"$PATH" pnpm exec electron .`, ].join(" ")); diff --git a/docs/reviews/2026-11-02-v0.5.0-val-session.md b/docs/reviews/2026-11-02-v0.5.0-val-session.md index ea1eaf91..cb4f801d 100644 --- a/docs/reviews/2026-11-02-v0.5.0-val-session.md +++ b/docs/reviews/2026-11-02-v0.5.0-val-session.md @@ -1,9 +1,8 @@ # Code Review and conversation acceptance: Val's one session (2026-11-02) -Everything left for a person on Code Review, CF-3 and CF-8, in one order, on one candidate. Agents have marked none -of these rows passed. The rows' full wording stays in the linked checklists, which remain the receipts' home. +Everything left for a person on Code Review, CF-3 and CF-8, in one order, on one candidate. Agents have marked none of these rows passed. The rows' full wording stays in the linked checklists, which remain the receipts' home. -**Source:** current `main`, which carries #490 and #491. On 2026-11-03 Val chose v0.4.2 with Code Review hidden (row 1.1), so this session runs after that release and decides whether Code Review can later go on by default. Write the SHA you test on every receipt. +**Source:** use an exact, recorded current `main` candidate, built in its owned worktree; record `git rev-parse HEAD` and `git rev-parse HEAD^{tree}` before starting. On 2026-11-03 Val chose v0.4.2 with Code Review hidden (row 1.1), so this session runs after that release and decides whether Code Review can later go on by default. Write the SHA you test on every receipt. **One build for everything** (about 2 minutes). Every launch below starts from here: @@ -13,27 +12,26 @@ pnpm install --frozen-lockfile && pnpm build git rev-parse HEAD # write this SHA on every receipt ``` -Estimated at the desk: about 2 hours for the keyboard, VoiceOver and live rows; the phone rows need the paired -iPhone and a Companion build with the native question card. +Estimated at the desk: about 2 hours for the keyboard, VoiceOver and live rows; the phone rows need the paired iPhone and a Companion build with the native question card. ## 1. Decisions (no launch, 10 minutes) -Post each answer on the issue named. Modex builds nothing further until you do. +The Code Review decisions below were answered on 2026-11-04; do not ask for them again. Candidate selection and the remaining human, provider and device gates remain separate. | # | Decide | What to look for | Receipt | | --- | --- | --- | --- | | 1.1 | Ship Code Review on by default before every gate below has passed, or only after them | **Answered 2026-11-03: hidden in v0.4.2, on only after the gates.** Turning it on later is a small product PR | #319 | -| 1.2 | Decision 1: avatars (C16, C81): login only, or fetch avatars | [Open decisions](../design/code-review.md#open-decisions). Fetching adds an image request per person to GitHub's avatar host | #319 | -| 1.3 | Decision 5: the Viewed toggle (C65) | Not built. Build it, or record it as left out | #324 | -| 1.4 | Decision 6: new tab (C07) and decision 7: access-mode indicator (C82) | C07 is disabled and C82 is words in the panel today | #319 | -| 1.5 | C58 attachment and C59 reasoning effort: build each, or approve the omission | Neither has a numbered decision | #325 | -| 1.6 | R1–R4 references: re-capture as a new baseline, or retire the comparison | The originals are gone. Re-capture means accepting the journey's captures as the reference, which stops being an independent check | #319 | -| 1.7 | The CF-8 candidate: this one, instead of `b643617` | This session assumes yes. `b643617` predates #450, #453, #463 and this work | #281 | +| 1.2 | Decision 1: avatars (C16, C81) | **Answered 2026-11-04: logins only.** No avatar fetch or new host | #319 | +| 1.3 | Decision 5: the Viewed toggle (C65) | **Answered 2026-11-04: local, revision-bound Viewed; built.** No GitHub write | #324 | +| 1.4 | Decisions 6 and 7: C07 and C82 | **Answered 2026-11-04: remove new tab; no access indicator.** The review panel keeps its confinement wording | #319 | +| 1.5 | C58 attachment and C59 reasoning effort | **Answered 2026-11-04: approved omissions.** The model select stays | #325 | +| 1.6 | R1–R4 original-reference comparison | **Answered 2026-11-04: retired in favor of a benchmark on real PRs.** New captures do not become independent originals; literal reference-specific issue boxes remain open | #319 | +| 1.7 | The CF-8 candidate: an exact new SHA, instead of `b643617` | Still requires Val’s candidate choice. `b643617` predates later repairs; acceptance does not transfer to a new candidate automatically | #281 | ## 2. Code Review: rollback, by hand (5 minutes) ```sh -env -u MODEX_E2E -u MODEX_DEMO MODEX_HOME=/tmp/modex-v050-rollback npx electron . +env -u MODEX_E2E -u MODEX_DEMO MODEX_HOME=/tmp/modex-v050-rollback pnpm exec electron . ``` | Row | Do | Expect | Receipt | @@ -51,19 +49,17 @@ node ../../docs/reviews/2026-10-22-cr8-voiceover/seed.mjs /tmp/modex-cr8-voiceov Follow [the checklist](2026-10-22-cr8-voiceover/checklist.md), parts A to D, at 1440×900 and again at 900×600. -Look for: every control named and reachable, focus returning after each popover, and nothing announced as a bare -"button". **Receipt:** fill its Result row; it covers #322 AC4 and CR-8 AC5. +Look for: every control named and reachable, focus returning after each popover, and nothing announced as a bare "button". **Receipt:** fill its Result row; it covers #322 AC4 and CR-8 AC5. ## 4. CR-6 live smoke (about 10 minutes, a small provider cost) Name `owner/repo#n` on #325 and say go. Follow the [procedure](2026-10-28-cr6-native-review.md#live-smoke-procedure-325-ac6-not-run), which starts the app with logging wrappers around your real `claude` and read-only `gh`. -Look for: `--safe-mode --restricted --tools Read` on the logged `-p` line, one start, a reply bound to the head you -opened, and no GitHub write. **Receipt:** `~/.claude/task-evidence/cr6-live-smoke-/receipt.md`, summarized on #325. +Look for: `--safe-mode --restricted --tools Read` on the logged `-p` line, one start, a reply bound to the head you opened, and no GitHub write. **Receipt:** `~/.claude/task-evidence/cr6-live-smoke-/receipt.md`, summarized on #325. ## 4a. Authenticated read of the overview and diff (about 5 minutes, no write) -`A-323` and `A-324` read through the service, on pre-merge candidates. Nothing has read a real overview and diff through Electron on this code. Name a PR you may read on #319 and say go, or do it yourself: start the app as in step 4's procedure, with its logging `gh` wrapper, and open that PR's overview and Changes. +Authenticated overview/diff reads and the ten-PR benchmark have now run through the production Electron read service on the runtime delivered by #520. See the [current benchmark receipt](2026-11-13-cr-real-pr-benchmark.md) for exact source/tree identities, read boundaries and limits. This is technical read evidence; it does not complete human VoiceOver, a live native provider review or the live write canary. If the candidate changes runtime code, qualify the affected reads again at its exact revision. Look for: the real title, activity and diff at the head GitHub shows, and only `gh api` GET reads in the wrapper's log. **Receipt:** `~/.claude/task-evidence/cr-authenticated-read-/receipt.md`, summarized on #319. @@ -71,61 +67,43 @@ Look for: the real title, activity and diff at the head GitHub shows, and only ` Name a disposable repository on #326 and say go. Follow the [procedure](2026-11-01-cr7-live-canary.md). -Look for: each preview matching what is sent, exactly one mutating `gh` call per step, the merge passing the -reviewed head, and no token in anything Modex wrote. **Receipt:** `$CANARY/steps.md`, summarized on #326. +Look for: each preview matching what is sent, exactly one mutating `gh` call per step, the merge passing the reviewed head, and no token in anything Modex wrote. **Receipt:** `$CANARY/steps.md`, summarized on #326. ## 6. CF-8 keyboard A1–A8 (about 15 minutes) ```sh node ../../docs/reviews/2026-10-20-keyboard-voiceover/seed.mjs /tmp/modex-voiceover -MODEX_HOME=/tmp/modex-voiceover/home npx electron . +MODEX_HOME=/tmp/modex-voiceover/home pnpm exec electron . ``` Follow [part A](2026-10-20-keyboard-voiceover/checklist.md#a-keyboard-only-no-mouse-or-trackpad). **Receipt:** the filled table on #281. ## 7. CF-8 VoiceOver B1–B7 (about 15 minutes) -Same launch as step 6, VoiceOver on (Command-F5). Follow [part B](2026-10-20-keyboard-voiceover/checklist.md#b-voiceover). -These rows still await you. Part C (C1–C5, deferred 2026-10-30) stays deferred unless you say otherwise. **Receipt:** #281. +Same launch as step 6, VoiceOver on (Command-F5). Follow [part B](2026-10-20-keyboard-voiceover/checklist.md#b-voiceover). These rows still await you. Part C (C1–C5, deferred 2026-10-30) stays deferred unless you say otherwise. **Receipt:** #281. ## 8. CF-3 desktop D1–D5 (about 15 minutes, a small provider cost) ```sh -MODEX_EVENT_JOURNAL=1 MODEX_HOME=/tmp/modex-v050-cf3 npx electron . +MODEX_EVENT_JOURNAL=1 MODEX_HOME=/tmp/modex-v050-cf3 pnpm exec electron . ``` Turn Plan on (⇧⌘P) in a disposable project on Codex, then send the prompt in [the setup](2026-10-22-cf3-question-acceptance.md#setup). Follow its D rows. The new automated test covers a draft surviving the card; D3 and D4 still need your eyes. -Look for: the card reachable by Tab, an incomplete answer refused in place, and the token absent from -`grep -ra "" "$MODEX_HOME"`. **Receipt:** the [CF-3 page](2026-10-22-cf3-question-acceptance.md), Run 1, and #281. +Look for: the card reachable by Tab, an incomplete answer refused in place, and the token absent from `grep -ra "" "$MODEX_HOME"`. **Receipt:** the [CF-3 page](2026-10-22-cf3-question-acceptance.md), Run 1, and #281. ## 9. CF-3 phone P1–P4 and P6 (about 15 minutes) Same Mac session as step 8, with a Companion build that has the native question card, paired. Follow the [P rows](2026-10-22-cf3-question-acceptance.md). P6 needs Companion 0.3.0 (8) or earlier installed; record its version and build. V1–V3 and P5 stay deferred as you said on 2026-11-01. **Receipt:** the same page and #281, with the iPhone model and iOS version. -## 10. CF-8 rows that need your call, not a test +## 10. Remaining CF-8 gates -The [#281 table in status](../status.md#open-issue-checklists) also lists these. Say on #281 whether each is agent work to schedule, or accepted as open: +Use the [#281 table in status](../status.md#open-issue-checklists) and the [current reproduction receipt](2026-11-12-cf8-reproduction-candidate.md). The named-source combined reproducibility and S5 criteria are accepted; the portable visual/performance record does not replace Val’s candidate choice, the ChatGPT multi-agent restriction check, human saved-Note acceptance, physical-device checks or the staged release recommendation. Preserve the existing C, V and P deferrals as recorded; do not silently reopen or mark them passed. -- memory measurement; -- the ChatGPT multi-agent restriction check; -- the staged release recommendation; -- the list of remaining visual differences. +## Delivered integration, no force-push action -## Agent actions blocked on you - -The automated rebases of #481, #484 and #485 could not be force-pushed: the session's safety rules denied it. The -rebased, signed commits are on `*-v050` branches, based on `b785054`. To update the PRs, from the primary checkout: - -```sh -for b in cr-activity-evidence cr-diff-controls cr-readiness-summary; do - git fetch origin "$b-v050" && git push --force-with-lease="$b" origin "origin/$b-v050:refs/heads/$b" -done -``` - -The `*-rebased` branches are an earlier rebase, on `7cfb29c`, and can be deleted. Both sets exist only because of the denial. +#490 already carries #481, #484, #485 and #491. The old instructions to force-push rebased branches are obsolete; no branch rewrite or deletion is needed for this session. Keep other owners’ worktrees and recovery data intact. ## After the session -Tell an agent "resume the Code Review v0.5.0 goal". Failing rows become issues linked from their tracker. Merging, the -release review, tagging and publishing remain yours to authorize. +Tell an agent "resume the Code Review v0.5.0 goal". Failing rows become issues linked from their tracker. Protected source delivery follows the authority of the active goal. Release review, tagging and publication remain separate authorization gates. diff --git a/docs/reviews/2026-11-13-cr-human-seed-focus.md b/docs/reviews/2026-11-13-cr-human-seed-focus.md new file mode 100644 index 00000000..1ca4d517 --- /dev/null +++ b/docs/reviews/2026-11-13-cr-human-seed-focus.md @@ -0,0 +1,37 @@ +# Code Review human seed and panel focus repair, 2026-11-13 + +The person-run Code Review procedure previously seeded only `baseWorld()`, while the integrated Electron journey added its own populated data separately. Running that seed through the production read service returned an empty description, missing activity/check/stack routes and incomplete files despite the checklist requiring those controls. A new regression runs the actual seed script and its synthetic `gh` through `CodeReviewService` and `ghTransport`; it failed first on the empty description, then caught an incomplete file list for another listed PR. + +The repaired seed uses a separate `humanWorld()` fixture without changing `baseWorld()`’s default records. It supplies a long synthetic Markdown description, 101 comments over two REST pages, five check/status records, an inferred stack and a provider deployment, coherent eleven-file/+8,912/−47 and four-file/+11/−4 diffs, and complete read routes for the other listed PRs. The synthetic CLI now emits a next-page Link header when a paged array has remaining records. Missing large and binary patches remain explicitly unavailable; file counts do not imply complete patch coverage. + +The printed launch line uses the already installed pinned-pnpm Electron command, clears GitHub token overrides and optional judge credentials, and isolates the home and synthetic GitHub configuration. Its `claude` and `codex` executables record arguments and exit 1. Startup may invoke their version or app-server discovery commands; those refused synthetic invocations are retained and are not native review turns. The procedure opens Review, Instructions and Merge surfaces without pressing Start, confirming a merge or sending a write. + +## Demonstrated runtime repair + +The actual seeded Electron run also exposed a real A5 defect: closing a header Review panel left focus on a removed Close button. A separate normal Electron regression reproduced it before the runtime change. `PrPane` previously cleared its panel state without restoring focus. Review and Merge now return focus to the opener in their own pane; Escape from inside either panel closes it through the same path. The instructions popover retains ownership of its own Escape. + +The regression exercises keyboard activation, Close and Escape for both header panels in both split panes, checks that instructions Escape leaves the underlying panel open, and records zero review turns or synthetic GitHub writes. It passed after the repair. It does not accept any human keyboard or VoiceOver row, nor does it establish behavior for untested panel types. + +## Native seeded procedure + +A complete actual Electron run used a new private home with the production renderer, preload, IPC and read service. Only window `show` was redirected to `showInactive`; native focus was sampled false and the matching isolated userData path was verified. It reached the real General checkbox while Code Review was hidden, opted in locally, opened the populated overview, loaded the second activity page, exercised Review/Instructions/Merge closure and focus, loaded the eleven-file lending diff and the second PR’s populated four-file split, then folded the split at 900×600. The owned Electron PID was absent after quit, tracked source inputs were unchanged during the run, and zero GitHub mutations or real provider turns were recorded. + +The qualified packet is `cr-human-seed-native-HaZtSz` under `/Users/buns/Documents/Codex/2026-11-11/modex-closeout/`. Its `proof.json` records the actual Electron/runtime versions, executable, source hashes, exact calls and five capture byte/hash/viewport records. The root agent inspected the overview, populated split and narrow captures. This is a local development Electron observation; no installed session was replaced or closed. + +Earlier probe attempts remain retained. Four stopped on incorrect probe assumptions: counting two UI representations of one deployment destination as one element; expecting Review to be disabled before its start-time provider probe; inspecting a body notice while its file was folded; and expecting the component-only `provider` patch label instead of REST’s actual `too-large` classification. A separate attempt exposed the genuine focus defect described above. None is erased by the final pass or counted as a production repair without the independent regression. + +The single scoped read-only review found zero Critical, Important or Minor issues. Its nine declined behaviors have explicit root rulings; state-change panel focus/Escape remains a named follow-up under the original goal. Final hosted/protected qualification remains required. The already delivered #521 documentation worktree was separately removed through the guarded helper after actual merge validation; an independent empty-bare restore verified the new bundle, source signature and all five reviewed documents, while all four probe original/copy pairs remain retained outside the deleted worktree. No other owner’s checkout or branch was pruned. + +The final handoff audit found a further fixture-only gap: after D4 filtered to `move`, D5 had no instruction to clear the filter, and the unfiltered shallow tree still had equal 802 px client/scroll heights at 1440×900. A retained actual seed run failed on that absence of overflow; the diff already had 964 px of content and needed no padding. The same eleven-file fixture now nests the eight small helper paths to provide real tree overflow, preserving every file count, patch and additions/deletions total. D5 explicitly reopens the tree when folded, clears the filter, and distinguishes focus-induced scroll from PageDown. This post-review data-only correction is root-audited in a two-line diff; the final build, all 2,588 units with 36 skips, and real wide/narrow seed-scroll qualification pass. The corrected native tree has 1,386 px of content in an 802 px viewport; PageDown at 1440×900 and 900×600 moves only the tree, with diff and inbox positions unchanged. The second qualified packet is `cr-human-seed-d5-native-AyTAlY`, including six capture byte/hash/viewport records, an absent owned Electron PID and zero recorded mutations or real turns. The root agent inspected the wide and narrow tree captures. All 854 other bound production/E2E/transport/seed-driver inputs are unchanged, and the full E2E suite does not import the human-world helper. + +## Human procedure and remaining gates + +The [checklist](2026-10-22-cr8-voiceover/checklist.md) now uses Settings → General for explicit local opt-in, removes the already retired C07 new-tab steps, and describes tree folding by available pane width. The [one-session guide](2026-11-02-v0.5.0-val-session.md) records the decisions already answered on 2026-11-04 and the completed authenticated benchmark, removes obsolete force-push instructions, and retains exact candidate selection, human/provider/device gates and existing deferrals. + +Every human Result cell remains blank. No VoiceOver or reduced-motion system setting was changed; no human pass, default activation, live native review, live write canary, installed-app replacement, physical-device result, release or tag follows from this repair. The [separate technical-criterion receipt](2026-11-13-cr-technical-acceptance.md) concerns existing on-main evidence and does not transfer acceptance to these human rows. + +## Validation checkpoint + +The seed regression passes through actual synthetic `gh` child processes, with no read-service or IPC replacement. Both the initial and final full local runs passed 2,588 unit cases with 36 skips and zero failures; the final full build and workspace typechecks passed. The focused normal Electron focus regression passed after the runtime repair. Full E2E passed 531 desktop cases with 17 opt-in skips, eight site cases and four web cases, zero failures/retry annotations. Its complete private result archive is digest-verified. The later human-world data correction passes its actual wide/narrow native seed consumer, with the final full unit run also passed, with unchanged full-E2E dependencies audited; exact signed candidate identity will be recorded after qualification. Hosted checks and protected delivery remain separate, pending gates. The owned branch fast-forwarded from `967b703` to the actual documentation-only #521 delivery `63a64ed`; that fast-forward changed none of the reviewed implementation or test bytes. The full suite began before that fast-forward; the incoming five-file documentation change adds no runtime/test input change. The full-E2E manifest binds all 855 runtime/test/dependency/seed inputs, including the six reviewed changed or added code files; the later helper-data correction and its new binding are recorded separately. These are working-tree qualifications until the signed candidate is created; no untested signed SHA is implied. + +Private first logs, traces and successful receipts are retained under the same closeout directory: `cr-human-seed-red.log`, `cr-human-seed-other-pr-red.log`, `cr-header-panel-focus-red.log`, `cr-header-panel-focus-red-artifacts/`, `cr-header-panel-focus-green.log`, `cr-human-seed-native-first-proof.json` through `cr-human-seed-native-fifth-proof.json`, `cr-human-seed-native-latest.json`, `cr-human-seed-native-and-focus-milestone.json`, `cr-human-seed-d5-red-proof.json`, `cr-human-seed-d5-native-latest.json` and `cr-human-seed-d5-e2e-reuse-audit.json`. The premature test invocation before compilation is retained separately as `cr-human-seed-premature-test-invocation.log`; it is not the meaningful regression failure. Local paths identify retained evidence and are not portable public artifact links. diff --git a/docs/reviews/2026-11-13-cr-technical-acceptance.md b/docs/reviews/2026-11-13-cr-technical-acceptance.md new file mode 100644 index 00000000..6e7b6bce --- /dev/null +++ b/docs/reviews/2026-11-13-cr-technical-acceptance.md @@ -0,0 +1,39 @@ +# Code Review: literal technical acceptance, 2026-11-13 + +This record covers three existing technical criteria: #322 AC1, #322’s resize/persistence implementation item, and #323 AC1. It does not accept their other criteria, close either issue, replace the retired original-reference comparison, or record human VoiceOver, live provider, live write, installed-app or physical-phone acceptance. + +The delivered runtime is protected #520, actual main `967b703768d040d64456c7d118548b97a3bae35b`, tree `6a241c26d089ac4d7daf3e4b30b23a28257010c5`. The real-PR benchmark ran on source `f9bef700390eb300d40424699193b2731d00e36c`, whose tree equals that actual main tree. The geometry probes ran on documentation-only source `1ad5dc958abd2e6ad012263dd2a75392a9458af9`, tree `7c4a96f32c41ffb03279b7ea5762b2d7f934df8e`; all eleven relevant production/test blobs and all 852 runtime/test/dependency inputs matched the delivered runtime. Documentation source identity is not a second runtime qualification. + +## Literal criteria and supporting observations + +| Issue | Existing criterion, unchanged | Evidence and boundary | +| --- | --- | --- | +| #322 | AC1: users reach the R1 and R4 workspace arrangements through real controls, not test-only DOM substitutions; selected PR and tab identity remain correct. | Protected navigation and integrated journey cases use real controls, preload and the production read service. The authenticated benchmark independently opened actual PRs #514 and #506, checked selected identity and tab state, and reached populated overview and split Changes. No read-handler replacement or fabricated DOM content. | +| #322 | Support pointer and keyboard resizing with minimum usable widths. Reuse existing layout persistence for non-sensitive UI preferences; validate restored geometry after window/monitor changes. At 900×600 collapse secondary panes into discoverable views rather than compressing everything until controls disappear. | Protected width-fitting, layout persistence, native window-state and pointer/keyboard E2E cases passed. Separate real Electron probes exercised pointer and keyboard resizing, full native quit/relaunch, an actual second connected display, unavailable saved coordinates and undersized saved bounds. Detailed observations below. | +| #323 | AC1: R1 and R2 are reached by selecting and scrolling the same PR; metadata and activity use the real read adapter or clearly identified deterministic fixtures. | Protected integrated journey selects and scrolls the same synthetic PR through the production read adapter. The authenticated benchmark checks actual #506 metadata and comments, then scrolls its populated overview to activity while retaining PR identity; GitHub GET controls independently bind titles, heads, counts and comment body hashes. | + +The [real-PR benchmark](2026-11-13-cr-real-pr-benchmark.md) records all ten PR identities, first failures and corrected probe assumptions. New captures are observations of the current app; they are not recovered independent R1–R4 originals. Reference-specific boxes and all human clauses retain their separate disposition. + +The literal acceptance is published and independently read back on [#322](https://github.com/TypeSafeAI/modex/issues/322#issuecomment-6847607067) and [#323](https://github.com/TypeSafeAI/modex/issues/323#issuecomment-6847609224): 12/14 and 11/14 boxes, respectively, with both issues open. Only these three boxes changed; other issue-body edits reflowed prose without changing words or fenced content. Protected documentation delivery #521 binds the geometry source tree exactly to actual main `63a64edf2ccbb2a512ee0cc5e7a1c7aeaa1f3638`; its actual run `43384781362` passed 2,587 units with 36 skips, 533 desktop cases with 14 opt-in skips, eight site cases and four web cases, with zero retry annotations and two independently verified artifacts. All 852 runtime/test/dependency inputs also match the previous delivered runtime. + +## Native resizing and restoration + +The probes used Electron 44.4.5, Chromium 152.0.7977.130 and embedded Node 24.21.0 on macOS arm64. Each used a new private `MODEX_HOME`, verified the matching Electron userData directory, and redirected only window `show` to `showInactive`; production window creation, renderer, IPC, layout and window-state persistence stayed intact. Only the probe’s own window was moved or quit. Sampled native focus remained false. + +1. At a 1440×900 native window, the real split divider began at 512 px, moved to 544 with the keyboard and to 524 with a pointer drag. The saved non-sensitive layout preference recorded 524. +2. A full quit/relaunch restored the 1440×900 window at its saved coordinates and the 524 px split preference. +3. A controlled private saved-window record located far outside every connected display recovered to a visible, bounded 1380×880 window. This is unavailable-coordinate recovery, not a physical monitor unplug test. +4. A private saved size of 200×100 was clamped to the native 900×600 minimum. The split folded to one active pane; both tabs and nine primary controls remained inside the viewport. Tree folding depends on the active pane width, so the checklist no longer assumes every 900 px window hides the tree. +5. With three real displays connected, the probe moved only its own window onto display id 1 at `{x:-1678,y:352,width:1300,height:800}`. A full quit/relaunch restored those exact second-display bounds and the 524 px split preference. No physical display was disconnected or reconfigured. + +All six observed parent Electron PIDs were absent after the runs; this does not assert an exhaustive descendant audit. There were zero recorded GitHub mutations and no provider turns. All 852 bound inputs and 804 compiled files remained unchanged. Some geometry captures were taken while the remote diff was still loading; those captures support geometry only. The populated R4 claim comes from the separate completed benchmark. + +## Verification and reproduction + +The actual #520 protected run was `43370489247`, macOS job `131704833478`: 2,587 unit passes, 36 skips; 533 desktop E2E passes, 14 opt-in skips; eight site and four web passes; zero retry annotations. Relevant passing cases include “restored pane widths are fitted to the room there is,” “the workspace’s pane widths persist with the layout,” native saved-bounds restoration/fallback/minimum tests, “file tree divider resizes with keyboard and pointer and persists on reload,” and “keyboard alone works at 1440×900 and 900×600; the split folds and resized panes persist within the window.” The [integration receipt](2026-11-13-cr-inline-integration.md) records actual delivery and evidence limits. + +For a fresh synthetic review, build the exact candidate, run the [seed](2026-10-22-cr8-voiceover/seed.mjs) from `apps/desktop` into a new empty directory, and follow its printed command and the [human checklist](2026-10-22-cr8-voiceover/checklist.md). Use the actual Settings → General checkbox in that disposable home. Do not transfer these technical passes to the blank human result cells. Native geometry reproduction should preserve any active installed session and use a separate owned development window/profile; record actual display bounds, versions, local preference and quit/relaunch results. + +Private receipts are retained under `/Users/buns/Documents/Codex/2026-11-11/modex-closeout/`: `cr-ac1-322-323-on-main-literal-audit.json`, `cr-322-resize-persistence-on-main-literal-audit.json`, `cr-native-geometry-enabled-latest.json`, `cr-native-geometry-multi-display-latest.json` and `cr-native-geometry-capture-manifest.json`. The six capture files have independent byte/hash/dimension records. These paths describe retained local evidence and are not public artifact links. + +The first geometry attempt failed before qualification because its private home had not opted into Code Review, correctly hidden by default. That failed attempt and its absent PID are retained separately; the corrected runs do not establish a causal app repair. No default activation, installed build replacement, release or acceptance beyond the three literal technical items follows from this record. diff --git a/docs/status.md b/docs/status.md index f88d8931..667c56bd 100644 --- a/docs/status.md +++ b/docs/status.md @@ -131,9 +131,9 @@ before relying on a tick. | [#280](https://github.com/TypeSafeAI/modex/issues/280) CF-7 | 11/14 | Steps 1, 2 and 4: model-proposed relations, file hashes and selection/notes context are not built; step-level linking was retired | Val reviews the two saved Notes and records steps 1, 2 and 4 as deferred or retired | | [#281](https://github.com/TypeSafeAI/modex/issues/281) CF-8 | 10/27 | Keyboard A1–A8, VoiceOver B1–B7, CF-3 D1–D5, P1–P4 and P6; ChatGPT multi-agent restriction check; fresh integrated candidate and staged release recommendation. C1–C5, V1–V3 and P5 are deferred | S5 and the named-source combined reproducibility criterion are accepted; retain the [reproduction receipt](reviews/2026-11-12-cf8-reproduction-candidate.md) and [literal acceptance](https://github.com/TypeSafeAI/modex/issues/281#issuecomment-6834287521), then complete Val’s candidate-bound checks and remaining native/device gates | | [#319](https://github.com/TypeSafeAI/modex/issues/319) CR tracker | 2/10 | CR-3 to CR-8 acceptance; the R1–R4 comparison is retired (2026-11-04) but its boxes still name it | Val's [one session](reviews/2026-11-02-v0.5.0-val-session.md) | -| [#322](https://github.com/TypeSafeAI/modex/issues/322) CR-3 | 10/14 | Original-reference comparison (AC1; retired 2026-11-04, box still names it), keyboard/VoiceOver (AC4); clearance beside CR-6's inline section is measured on `main` (#491), but these boxes also need the person-run checks | Val runs the [CR-8 VoiceOver checklist](reviews/2026-10-22-cr8-voiceover/checklist.md) | -| [#323](https://github.com/TypeSafeAI/modex/issues/323) CR-4 | 10/14 | Original R1/R2 comparison, VoiceOver; clearance beside CR-6's inline section is measured on `main` (#491), but these boxes also need the person-run checks. Avatars are settled as logins only (decision 1, 2026-11-04) | Benchmark on real pull requests replaces the retired comparison; the comparison boxes stay unticked | -| [#324](https://github.com/TypeSafeAI/modex/issues/324) CR-5 | 12/14 | Original R4 comparison (AC1), retired on 2026-11-04 but still named by the box; the Viewed toggle is decided (local, revision-bound) and not built | Build the Viewed toggle; run the benchmark | +| [#322](https://github.com/TypeSafeAI/modex/issues/322) CR-3 | 12/14 | Logical focus/navigation/menu dismissal, reduced motion and composer clearance; AC4’s human keyboard checks and original-reference capture clause remain open. Literal technical AC1 and resize/persistence are accepted on the delivered runtime | Complete the candidate-bound [human checklist](reviews/2026-10-22-cr8-voiceover/checklist.md); retain the [technical receipt](reviews/2026-11-13-cr-technical-acceptance.md) and [literal acceptance](https://github.com/TypeSafeAI/modex/issues/322#issuecomment-6847607067) | +| [#323](https://github.com/TypeSafeAI/modex/issues/323) CR-4 | 11/14 | Measured text/spacing/card density and clearance, refresh focus/accessibility, long/narrow readability and final-item/focus clearance; AC6’s verified CR-7 controls retain the live-canary gate. Literal technical AC1 is accepted | Complete remaining candidate-bound human and live-control gates; retain the [technical receipt](reviews/2026-11-13-cr-technical-acceptance.md) and [literal acceptance](https://github.com/TypeSafeAI/modex/issues/323#issuecomment-6847609224) | +| [#324](https://github.com/TypeSafeAI/modex/issues/324) CR-5 | 12/14 | Filename/code inertness and path-direction handling, keyboard file navigation/focus and accessible add/remove/context labels; AC1’s approved-reference geometry remains open despite the retired comparison. The local revision-bound Viewed toggle is built | Keep unfulfilled literal clauses open; retain the [completed real-PR benchmark](reviews/2026-11-13-cr-real-pr-benchmark.md) and separate human/live gates | | [#325](https://github.com/TypeSafeAI/modex/issues/325) CR-6 | 13/14 | Authorized live native smoke (AC6) | Run the smoke once on a small open TypeSafeAI/modex PR (authorized 2026-11-04) | | [#326](https://github.com/TypeSafeAI/modex/issues/326) CR-7 | 13/14 | Live canary on a disposable repository (AC6) | Val names a disposable repository | | [#327](https://github.com/TypeSafeAI/modex/issues/327) CR-8 | 7/17 | The full fixture journey and adversarial/race item are accepted at their [named source/CI/native scopes](reviews/2026-11-13-cr8-adversarial-delivery.md); reference comparison (retired 2026-11-04, boxes still name it), VoiceOver and the live gates. Budgets and C76 landed in #490; re-check item 18 and AC5 once Val confirms the budget numbers | Val's [one session](reviews/2026-11-02-v0.5.0-val-session.md) | @@ -147,6 +147,8 @@ before relying on a tick. ## In flight +- **Code Review person-run seed and header-panel focus.** The owned source candidate repairs the actual human-review seed: long description, 101 paged comments, checks/stack/deployment and coherent diffs for all listed synthetic PRs. A normal Electron regression reproduced header Review panel Close dropping focus; Review/Merge Close and scoped Escape now return to their own split-pane button, preserving instructions Escape. Build, workspace typechecks, 2,588 units with 36 skips, 531 desktop E2E cases with 17 opt-in skips, eight site cases and four web cases pass. The isolated seeded overview/activity/panel/diff journey passes; the final fixture-only D5 scroll-density correction passes actual wide/narrow PageDown checks with unchanged diff/inbox positions, its final full units also pass, and protected delivery is pending. Human Result cells stay blank. The checklist uses explicit private-home General opt-in, removes C07 and describes conditional tree folding. State-change panel focus/Escape remains a named follow-up. [Repair and limits](reviews/2026-11-13-cr-human-seed-focus.md). + - **Code Review line comments integration** (#513, #520). Protected #520 delivered signed squash `967b703768d040d64456c7d118548b97a3bae35b`, tree `6a241c26d089ac4d7daf3e4b30b23a28257010c5`, from qualified source `f9bef70`; #513 is closed as superseded and its owner’s checkout/branch remain preserved. Activity loads the first 100 REST review comments with truthful file/line/reply/unavailable-location labels and partial/capped states. The actual protected checkout passed 2,587 units with 36 skips, 533 desktop cases with fourteen opt-in skips, eight site cases and four web cases, with no retry annotations; both artifacts passed digest/ZIP checks. Corrected source CI passed all twelve checks, including 65 native iPhone units and 43 ordinary UI cases plus one intentional expected-failure control. The first iPhone job’s 30-minute cancellation remains retained; the reviewed whole-job correction to 45 minutes changed no test assertions, individual waits or retries. Hosted simulator, scripted-provider installed CLI and real authenticated-read evidence remain distinct from physical phone, human, live-provider/write and activation acceptance. Resolved-thread state, inline placement and further comment pages remain separate requirements. [Integration and delivery receipt](reviews/2026-11-13-cr-inline-integration.md); [new real-PR benchmark](reviews/2026-11-13-cr-real-pr-benchmark.md). - **Local-model refresh preservation** (#381). Protected #503 delivered signed `558b54f8`, exact reviewed tree `3ba66a4`. Its queue passed 2,478 units with 36 skips, 522 desktop E2E cases with eight skips and seven site cases. Canonical cases preserve two thread drafts, staged image bytes, search/edit focus and selected text through delayed metadata, and keep an old revision-bound target after endpoint replacement. The full S2/AC3 UI/race audit and conservative S5 option/pinning guards are reconciled at five of 13 boxes; qualification/provenance/admission/human requirements remain open. [Delivery and limits](reviews/2026-11-12-local-model-refresh-preservation.md#actual-protected-delivery). From 4029a077b3483c4cfb9f26b078fe9b4d343a7ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=20Alexander=20=F0=9F=91=91?= Date: Fri, 13 Nov 2026 04:12:08 -0600 Subject: [PATCH 2/2] test(code-review): preserve comparison revisions and diagnose keyboard scroll Retain immutable comparison provenance when the synthetic PR head changes, and cover both held parallel reads through the real Electron read service. Keep all Markdown keyboard assertions while adding bounded failure observations. Record the initial hosted failures, validated diagnostic controls, complete follow-up local qualification and independently preserved human QA runtime without claiming human or protected acceptance. --- .../e2e/code-review-regressions.spec.ts | 15 +++++-- apps/desktop/e2e/markdown-keyboard.spec.ts | 40 ++++++++++++++++++- .../reviews/2026-11-13-cr-human-seed-focus.md | 4 ++ docs/reviews/2026-11-13-pr522-ci-followup.md | 15 +++++++ docs/status.md | 2 +- 5 files changed, 70 insertions(+), 6 deletions(-) create mode 100644 docs/reviews/2026-11-13-pr522-ci-followup.md diff --git a/apps/desktop/e2e/code-review-regressions.spec.ts b/apps/desktop/e2e/code-review-regressions.spec.ts index 68142ddb..8bc15b19 100644 --- a/apps/desktop/e2e/code-review-regressions.spec.ts +++ b/apps/desktop/e2e/code-review-regressions.spec.ts @@ -108,7 +108,7 @@ test("identity: a read refused because gh's sign-in moved and came back is read expect(pulls()).toBeGreaterThan(2); }); -test("revision: a head that moves before or during a files page is never served as the current diff", async () => { +for (const heldRead of ["files", "comparison"] as const) test(`revision: a head that moves before or during a ${heldRead} read is never served as the current diff`, async () => { const world = baseWorld(); h = await launchWithGh(world); const key = await keyOf("example-org/lending#73"); @@ -128,11 +128,18 @@ test("revision: a head that moves before or during a files page is never served const listed = () => h.calls().filter((c) => c.startsWith("repos/example-org/lending/pulls/73/files")).length; // The moved head was caught by the read before the page: the files list itself was never asked for. expect(listed()).toBe(0); - h.world((w) => { w.holds = { "repos/example-org/lending/pulls/73/files": "files" }; }); + const comparison = `repos/example-org/lending/compare/${sha("b")}...${sha("d")}`; + const heldEndpoint = heldRead === "files" ? "repos/example-org/lending/pulls/73/files" : comparison; + h.world((w) => { + // A comparison names immutable SHAs. It remains readable after the PR moves; + // deriving it from the world's current PR would race the parallel files read. + w.routes[comparison] = { base_commit: { sha: sha("b") }, merge_base_commit: { sha: sha("b") } }; + w.holds = { [heldEndpoint]: "revision-read" }; + }); const during = invoke({ op: "files", requestId: "f2", key, revision: current, cursor: null }); - await expect.poll(listed).toBe(1); + await expect.poll(() => h.calls().filter(c => c.split("?")[0] === heldEndpoint).length).toBe(1); h.world((w) => { w.routes["repos/example-org/lending/pulls/73"] = ghPull(LENDING, 73, "Moved again", { head: sha("e"), files: 2, additions: 3, deletions: 1 }); }); - h.release("files"); + h.release("revision-read"); const moved = await during; expect(moved.scope.revision).toEqual(current); expect(moved.result).toMatchObject({ state: "stale", reason: "head-changed" }); diff --git a/apps/desktop/e2e/markdown-keyboard.spec.ts b/apps/desktop/e2e/markdown-keyboard.spec.ts index eba9f1f5..1f437590 100644 --- a/apps/desktop/e2e/markdown-keyboard.spec.ts +++ b/apps/desktop/e2e/markdown-keyboard.spec.ts @@ -10,6 +10,24 @@ for (const theme of ["graphite", "jev", "coven"] as const) { const { home } = seedHome(); const { app, page } = await launch(home); try { + // Observe renderer delivery/cancellation; snapshot native focus on failure. + // DOM focus alone does not explain a missing native scroll action. + await page.evaluate(() => { + const state = window as typeof window & { __markdownKeys?: unknown[] }; + const records: unknown[] = state.__markdownKeys = []; + const record = (value: unknown) => { records.push(value); if (records.length > 200) records.shift(); }; + const scroll = (el: Element) => ({ tag: el.tagName, className: el.className, left: el.scrollLeft, width: el.clientWidth, scrollWidth: el.scrollWidth }); + for (const type of ["keydown", "keyup"] as const) document.addEventListener(type, event => { + if (!["ArrowRight", "ArrowLeft", "Tab"].includes(event.key)) return; + const target = event.target instanceof Element ? scroll(event.target) : null; + // A later task observes cancellation after all capture/bubble listeners. + setTimeout(() => record({ type, key: event.key, at: performance.now(), trusted: event.isTrusted, defaultPrevented: event.defaultPrevented, + documentFocused: document.hasFocus(), visibility: document.visibilityState, target, active: document.activeElement && scroll(document.activeElement) }), 0); + }, true); + document.addEventListener("scroll", event => { + if (event.target instanceof Element && event.target.matches(".md-table, pre.code")) record({ type: "scroll", at: performance.now(), target: scroll(event.target) }); + }, true); + }); await resizeWindow(app, page, 900, 600); await setTheme(page, theme); await page.emulateMedia({ reducedMotion: "reduce" }); @@ -86,6 +104,26 @@ for (const theme of ["graphite", "jev", "coven"] as const) { }))).toEqual([]); await expect(items(page, "tool")).toHaveCount(0); await expect(items(page, "approval")).toHaveCount(0); - } finally { await app.close(); } + } catch (error) { + // A stalled renderer must not prevent collecting native state or rethrowing + // the original assertion. Keep both observations inside their own budget. + const observe = async (read: () => Promise) => { + let timer: ReturnType | undefined; + try { + return await Promise.race([Promise.resolve().then(read).catch(readError => ({ error: String(readError) })), + new Promise<{ error: string }>(resolve => { timer = setTimeout(() => resolve({ error: "Diagnostic read exceeded 2000ms" }), 2000); })]); + } finally { clearTimeout(timer); } + }; + const [renderer, native] = await Promise.all([ + observe(() => page.evaluate(() => ({ records: (window as typeof window & { __markdownKeys?: unknown[] }).__markdownKeys, + documentFocused: document.hasFocus(), visibility: document.visibilityState, active: document.activeElement?.outerHTML.slice(0, 800), + scroll: [...document.querySelectorAll(".md-table, pre.code")].map(el => ({ tag: el.tagName, className: el.className, left: el.scrollLeft, width: el.clientWidth, scrollWidth: el.scrollWidth })) }))), + observe(() => app.evaluate(({ BrowserWindow }) => ({ windows: BrowserWindow.getAllWindows().map(w => ({ id: w.id, focused: w.isFocused(), contentsFocused: w.webContents.isFocused(), visible: w.isVisible(), minimized: w.isMinimized(), bounds: w.getBounds() })) }))), + ]); + await observe(() => test.info().attach("markdown-keyboard-diagnostics", { body: JSON.stringify({ renderer, native }, null, 2), contentType: "application/json" })); + throw error; + } finally { + await app.close(); + } }); } diff --git a/docs/reviews/2026-11-13-cr-human-seed-focus.md b/docs/reviews/2026-11-13-cr-human-seed-focus.md index 1ca4d517..3e087d72 100644 --- a/docs/reviews/2026-11-13-cr-human-seed-focus.md +++ b/docs/reviews/2026-11-13-cr-human-seed-focus.md @@ -35,3 +35,7 @@ Every human Result cell remains blank. No VoiceOver or reduced-motion system set The seed regression passes through actual synthetic `gh` child processes, with no read-service or IPC replacement. Both the initial and final full local runs passed 2,588 unit cases with 36 skips and zero failures; the final full build and workspace typechecks passed. The focused normal Electron focus regression passed after the runtime repair. Full E2E passed 531 desktop cases with 17 opt-in skips, eight site cases and four web cases, zero failures/retry annotations. Its complete private result archive is digest-verified. The later human-world data correction passes its actual wide/narrow native seed consumer, with the final full unit run also passed, with unchanged full-E2E dependencies audited; exact signed candidate identity will be recorded after qualification. Hosted checks and protected delivery remain separate, pending gates. The owned branch fast-forwarded from `967b703` to the actual documentation-only #521 delivery `63a64ed`; that fast-forward changed none of the reviewed implementation or test bytes. The full suite began before that fast-forward; the incoming five-file documentation change adds no runtime/test input change. The full-E2E manifest binds all 855 runtime/test/dependency/seed inputs, including the six reviewed changed or added code files; the later helper-data correction and its new binding are recorded separately. These are working-tree qualifications until the signed candidate is created; no untested signed SHA is implied. Private first logs, traces and successful receipts are retained under the same closeout directory: `cr-human-seed-red.log`, `cr-human-seed-other-pr-red.log`, `cr-header-panel-focus-red.log`, `cr-header-panel-focus-red-artifacts/`, `cr-header-panel-focus-green.log`, `cr-human-seed-native-first-proof.json` through `cr-human-seed-native-fifth-proof.json`, `cr-human-seed-native-latest.json`, `cr-human-seed-native-and-focus-milestone.json`, `cr-human-seed-d5-red-proof.json`, `cr-human-seed-d5-native-latest.json` and `cr-human-seed-d5-e2e-reuse-audit.json`. The premature test invocation before compilation is retained separately as `cr-human-seed-premature-test-invocation.log`; it is not the meaningful regression failure. Local paths identify retained evidence and are not portable public artifact links. + +## Initial hosted failure and preserved QA runtime + +The initial signed source is `1b2c58b155d188e372b5647c46a5e93f55c46115`. Its hosted source run failed two desktop E2E cases despite passing all units and the iPhone suites; the explicit revision-comparison fixture repair, unchanged Markdown failure limits, validated failure diagnostics and independently qualified portable human QA runtime are recorded in the [CI follow-up receipt](2026-11-13-pr522-ci-followup.md). The original person-run candidate remains unaccepted, and the portable copy retains its exact source/runtime without depending on further coding work in this checkout. diff --git a/docs/reviews/2026-11-13-pr522-ci-followup.md b/docs/reviews/2026-11-13-pr522-ci-followup.md new file mode 100644 index 00000000..4eb03f7b --- /dev/null +++ b/docs/reviews/2026-11-13-pr522-ci-followup.md @@ -0,0 +1,15 @@ +# PR #522 source CI follow-up, 2026-11-13 + +The initial signed source `1b2c58b155d188e372b5647c46a5e93f55c46115` was tested in preview `aa3f9198bbfa2c472ba3eeb06ce2a023fb829a1c`, whose parents are main `63a64edf2ccbb2a512ee0cc5e7a1c7aeaa1f3638` and that source and whose tree equals source tree `bcf47a70a158183334a2ddc2b42b13f46f997a32`. [CI run 43394809328](https://github.com/TypeSafeAI/modex/actions/runs/43394809328) passed all 2,588 units with 36 skips but failed two desktop E2E cases, with 532 passed and 14 skipped in 40.1 minutes and no framework retry annotations. The subsequent site and web steps were skipped. The iPhone job independently passed 65 native tests plus 43 ordinary paired UI tests and one intentional expected failure, with complete result bundles and zero unexpected failures or skips. This is simulator qualification, not physical-phone or human acceptance; the overall source CI run failed and was not queued. + +The moving-head case expected `stale/head-changed` but received `unavailable/not-found`. Its synthetic comparison endpoint inferred the requested immutable SHA pair from the world's current PR head, while production reads the comparison and files page in parallel. Changing the head when the files process logged its request could remove comparison provenance before that other process read the world. A retained direct-service diagnostic held both reads, moved the head, and reproduced the exact refusal; an explicit comparison response for the old SHA pair produced the expected stale result. The normal Electron regression now separately holds the files and comparison requests. Before the fixture repair, the comparison-held case failed with the original mismatch while its files-held control passed. The fixture now explicitly retains that immutable pair; both orderings pass through the unchanged production service. No application read behavior or refusal was weakened. + +The other failure was the graphite Markdown keyboard case: its focused table had more than 100 pixels of horizontal overflow, but ArrowRight left its horizontal position at zero for the existing 15-second assertion. Four unchanged focused local cases passed; that observation does not explain or repair the original failure. The Markdown test now records bounded DOM key delivery, cancellation after capture/bubble listeners, focus, visibility and scroll geometry, and attaches those records with native window focus/visibility/bounds on failure. A scoped review found that sequential diagnostic evaluations had no explicit observation budget. Each renderer/native read now has its own two-second budget and runs concurrently, and attachment also has a bounded budget; a diagnostic failure cannot replace the original assertion. Every original Tab, Shift-Tab, scrolling, focus-ring, clipboard, accessible-name and reduced-motion assertion and deadline remains. A separate disposable copy deliberately cancels ArrowRight during bubbling: the original scrolling assertion still fails, and the attachment records the trusted cancelled key and stationary overflowing table. That control validates the diagnostics; it is not the original failure's cause and is absent from the shipped test. An early observer assumed Electron's native input hook would receive CDP-simulated keys; it did not, despite trusted DOM key events. That unused observer was removed and the final diagnostic control was rerun successfully within its expected-failure scope. + +The exact original human QA runtime has been preserved outside the worktree in `cr-human-1b2c58b-portable` under the private closeout evidence directory. All 17,124 copied files and 54 internal dependency links are checked, including the 855 bound source inputs and 808 compiled files. The copied Electron 44.4.5 runtime passed the nine-step synthetic seed journey, including real private-home General opt-in, overview and second activity page, header-panel focus, both diffs and independent wide/narrow tree scrolling. Native focus was sampled false, the isolated userData path was verified, the owned PID was absent after quit, and no GitHub mutation or real provider turn occurred. The root agent inspected the wide and narrow captures, and all runtime hashes and internal links still matched afterward. The person-run seed was regenerated inside the portable folder after finding that a copied seed retains absolute project/recorder paths to its original external seed. The original copied seed is retained; the regenerated world and synthetic GitHub program are identical, settings and empty threads match, and the project and both refused-provider recorder destinations now belong to the portable seed. The fresh person-run home remains unopened and its availability request unanswered; no human row is accepted. This retained runtime allows the coding checkout to advance without destroying the prepared source-specific candidate. + +## Follow-up validation + +The full workspace build and typechecks pass. A separate TypeScript check including both changed E2E files and the renderer bridge declaration passes. The full unit run passes 2,588 cases with 36 skips and zero failures/cancellations. The complete E2E command exits zero: 532 desktop passes and 17 opt-in skips in 23.2 minutes, eight site passes in 7.5 seconds and four web passes in 2.5 seconds, with zero failures or framework retries. All 855 bound runtime/test/dependency/seed inputs stayed frozen throughout. The new build also reproduces all 808 original compiled files byte for byte, so the original native seed/focus evidence retains that unchanged-runtime scope. The complete E2E archive is readable and SHA-256 verified. Protected delivery and exact-head hosted qualification remain required. The original source failure, diagnostic controls, first failures and successful local receipts remain retained separately. There has been no unchanged hosted rerun, merge, release or tag. + +The private evidence directory is `/Users/buns/Documents/Codex/2026-11-11/modex-closeout/`. Relevant receipts are `pr522-followup-final-local-proof.json`, `pr522-followup-full-e2e-proof.json`, `pr522-followup-native-reuse-binding.json`, `pr522-first-failure-diagnosis-checkpoint.json`, `pr522-1b2c58b-first-failure-artifact-proof.json`, `pr522-comparison-race-diagnostic.json`, `pr522-revision-comparison-red.log`, `pr522-revision-comparison-green.log`, `pr522-markdown-diagnostic-shipping-control-proof.json` and `cr-human-1b2c58b-portable-preservation.json` and `cr-human-1b2c58b-portable-seed-rooting-proof.json`. These local paths identify retained evidence and are not portable public artifact links. All three newly downloaded source-failure archives matched GitHub's SHA-256/size metadata and passed ZIP verification; the already verified iPhone archive was reused. diff --git a/docs/status.md b/docs/status.md index 667c56bd..76593cbe 100644 --- a/docs/status.md +++ b/docs/status.md @@ -147,7 +147,7 @@ before relying on a tick. ## In flight -- **Code Review person-run seed and header-panel focus.** The owned source candidate repairs the actual human-review seed: long description, 101 paged comments, checks/stack/deployment and coherent diffs for all listed synthetic PRs. A normal Electron regression reproduced header Review panel Close dropping focus; Review/Merge Close and scoped Escape now return to their own split-pane button, preserving instructions Escape. Build, workspace typechecks, 2,588 units with 36 skips, 531 desktop E2E cases with 17 opt-in skips, eight site cases and four web cases pass. The isolated seeded overview/activity/panel/diff journey passes; the final fixture-only D5 scroll-density correction passes actual wide/narrow PageDown checks with unchanged diff/inbox positions, its final full units also pass, and protected delivery is pending. Human Result cells stay blank. The checklist uses explicit private-home General opt-in, removes C07 and describes conditional tree folding. State-change panel focus/Escape remains a named follow-up. [Repair and limits](reviews/2026-11-13-cr-human-seed-focus.md). +- **Code Review person-run seed and header-panel focus.** The owned source candidate repairs the actual human-review seed: long description, 101 paged comments, checks/stack/deployment and coherent diffs for all listed synthetic PRs. A normal Electron regression reproduced header Review panel Close dropping focus; Review/Merge Close and scoped Escape now return to their own split-pane button, preserving instructions Escape. Build, workspace typechecks, 2,588 units with 36 skips, 531 desktop E2E cases with 17 opt-in skips, eight site cases and four web cases pass. The isolated seeded overview/activity/panel/diff journey passes; the final fixture-only D5 scroll-density correction passes actual wide/narrow PageDown checks with unchanged diff/inbox positions, its final full units also pass, and protected delivery is pending. Human Result cells stay blank. The checklist uses explicit private-home General opt-in, removes C07 and describes conditional tree folding. Initial signed source `1b2c58b` passed hosted units and iPhone suites but failed two desktop E2E cases. The immutable-comparison fixture race is reproduced and repaired with two deterministic request orderings; the unexplained Markdown ArrowRight failure has validated observation-only diagnostics, with all original assertions retained. The follow-up full build, workspace/E2E typechecks and 2,588 units with 36 skips pass. Full follow-up E2E passes 532 desktop cases with 17 opt-in skips, eight site cases and four web cases, zero failures/retries; exact-head hosted/protected qualification remains pending. The original human candidate is independently preserved and natively qualified in a portable runtime, with human rows still blank. State-change panel focus/Escape remains a named follow-up. [Repair and limits](reviews/2026-11-13-cr-human-seed-focus.md), [CI follow-up](reviews/2026-11-13-pr522-ci-followup.md). - **Code Review line comments integration** (#513, #520). Protected #520 delivered signed squash `967b703768d040d64456c7d118548b97a3bae35b`, tree `6a241c26d089ac4d7daf3e4b30b23a28257010c5`, from qualified source `f9bef70`; #513 is closed as superseded and its owner’s checkout/branch remain preserved. Activity loads the first 100 REST review comments with truthful file/line/reply/unavailable-location labels and partial/capped states. The actual protected checkout passed 2,587 units with 36 skips, 533 desktop cases with fourteen opt-in skips, eight site cases and four web cases, with no retry annotations; both artifacts passed digest/ZIP checks. Corrected source CI passed all twelve checks, including 65 native iPhone units and 43 ordinary UI cases plus one intentional expected-failure control. The first iPhone job’s 30-minute cancellation remains retained; the reviewed whole-job correction to 45 minutes changed no test assertions, individual waits or retries. Hosted simulator, scripted-provider installed CLI and real authenticated-read evidence remain distinct from physical phone, human, live-provider/write and activation acceptance. Resolved-thread state, inline placement and further comment pages remain separate requirements. [Integration and delivery receipt](reviews/2026-11-13-cr-inline-integration.md); [new real-PR benchmark](reviews/2026-11-13-cr-real-pr-benchmark.md).