Docs
Loading the page
Loading the page
The build log: what each task and session produced and which tests ran.
Append-only. Add new entries at the end. Never edit or remove an earlier entry (AC-R21.4).
### <date> | Task <n.m> or Vibe session: <topic>
- **What it produced:** ...
- **Requirement ids served:** AC-R..., AC-R...
- **Tests run:** command and result; list any test that did not run, with the reason.gitkeep files), LICENSE (MIT, the default for OWNER DECISION 2, recorded in docs/decisions.md), .env.example with every variable name and no values, .gitignore that ignores nothing under /.kiro, and package.json with the npm scripts. The spec folder under .kiro/specs/action-potential/ is committed.git check-ignore -v over every file under .kiro: nothing ignored. Not run: Next.js scaffold, ESLint rules ("no any without a comment", "no non-null assertion on external data"), npm run lint, npm run typecheck and npm test. The sandbox cannot reach the npm registry, so no dependencies are installed and package.json lists scripts only. Task 1.1 stays open until these run. Not done: creating the public GitHub repository and its About section.docs/build-log.md, docs/decisions.md, CHANGELOG.md, docs/inspiration.md and THIRD_PARTY_NOTICES.md, each with its template..kiro/steering/product.md, tech.md and structure.md, each with inclusion: always..kiro/steering/ui.md, compliance.md, prompts.md (all fileMatch) and copy-voice.md (manual, #copy-voice)..kiro/hooks/h1-parser-guard.json to h10-docs-page.json, each a v1 hook file with the trigger, matcher and command of its row. H7 reads the shell command from stdin JSON and exits 2 only when it runs git commit and npm run scan:secrets -- --staged fails.npm that fails: it exits 2 for git commit input and 0 for other commands; H1 exits 0 for a non-matching path. Not run: firing the hooks in Kiro and the README screenshots. The scripts the hooks call (task 3) do not exist yet..kiro/settings/mcp.json (Postgres read-only, browser automation, fetch with an allow-list from the environment, GitHub; every key an environment reference) and the agents importer-builder, compliance-reviewer (with compliance.md as a resource) and copy-editor in .kiro/agents/.mcp.json parses as JSON and holds no literal secret. Not run: the secret scan (task 3.2), loading agents and connecting servers in Kiro, and opening one GitHub issue per top-level task (AC-R18.6).scripts/check-copy.ts, scan-secrets.ts, check-licences.ts, check-kiro-ignored.ts, check-contrast.ts, check-migration-rls.ts (with --fix), check-append-only.ts, spec-sync.ts, a shared scripts/lib/files.ts, and .githooks/pre-commit running the staged secret scan. Unit tests with passing and failing fixtures for every rule are in tests/unit/.node:test cases pass; each script also exits 0 on the real tree. Not run: Vitest (npm blocked, see decisions.md), the hooks inside Kiro, core.hooksPath (set by npm run prepare).scripts/redteam.ts (findRedteamSets, runRedteam; exits 0 with "no purposes yet" while no prompts/<purpose>/redteam/ case exists, exits 1 with "gateway not built" when cases exist and no AI gateway module is present), tests/unit/redteam.test.ts, and .github/workflows/ci.yml.node:test cases pass (3 new); redteam.ts prints "no purposes yet" and exits 0 on the real tree; every npm run script named in the workflow exists in package.json. Not run: the workflow on GitHub, npm ci, lint, typecheck, Vitest, Playwright. The YAML was reviewed by eye (no PyYAML here).src/platform/config (parseEnv, dependency-free validator), src/platform/clock, src/platform/keys (HKDF-SHA-256 to Ed25519 PKCS#8), src/platform/log, src/platform/security/headers.ts, rate-limit.ts, tokens.ts, eslint-rules/no-process-env.js and no-raw-date.js, and .env.example notes.node:test cases for clock, keys (determinism, per-key difference, sign/verify, no key in logs), log masking, each security header, rate limit reached and reset, config parsing, and both lint rules through a fake rule context. Not run: Vitest, ESLint itself with the rules, middleware.ts (Next not installed, not written), app/api/health/route.ts (task 7.4 health route needs Next and a database), Zod schema.db/migrations/0001_roles_workspaces_jobs.sql, 0002_definer_functions_public_tokens.sql, 0003_core_schema_append_only.sql, and src/platform/tenancy (withWorkspace over a minimal client).check-migration-rls.ts and check-append-only.ts exit 0 on the tree; unit tests read the SQL and check roles, definer functions, grants, uniques and columns; withWorkspace tested with a fake client. Not run: the SQL on Postgres 16 (none available), Drizzle wiring, integration tests for unknown tokens, function column limits, append-only rejection and AC-P1 (tasks 8.2, 8.3, 8.6 "Done when" is not met).package.json devDependencies (eslint, typescript, vitest, fast-check, @types/node), CI installs with npm install and no npm cache (no lockfile yet), push runs on all branches with a cancelling concurrency group, tsconfig.json and vitest.config.ts added (vitest skips node:test and e2e files), rate limiter rejects new keys at the cap instead of evicting live buckets, with three regression tests.scan-secrets.ts, package.json parses.npm install, tsc, ESLint and Vitest (no registry), Migration 0002 on Postgres 16.src/platform/audit (maskPersonal, recordAudit), src/platform/jobs (enqueue, claim, runJob, backoffMs), src/worker.ts (drain), src/scheduler.ts (tick, enqueue only), src/platform/ports (selectPorts), src/platform/simulators, src/platform/injection-check, src/platform/ai-gateway (createGateway, run, estimateBatchCost), and tests audit, jobs, ports, injection-check, ai-gateway, evidence-property.scan-secrets.ts, check-copy.ts. Each gateway rejection path (budget, injection, provider, schema, evidence, secret, prompt leak, guard) has its own test. Property test: 300 iterations.ON CONFLICT, claim_job(), retry updates), integration tests for 8.4 and 8.5, Zod schemas (a structural Schema is used), live AI and S3 adapters (not written), fast-check, Vitest. Tasks 8.4, 8.5, 9.1 and 9.3 are not ticked in tasks.md because their "Done when" or scope needs Postgres, the S3 adapter or prompt schemas. 9.2 and 9.6 are unit-level only.styles/tokens.json and styles/tokens.css (light, dark, kiroween, system; type, space, radius, shadow, motion; reduced motion), src/platform/theme/init-script.ts (script text and sha256 CSP hash), eslint-rules/no-raw-hex.js (registered in eslint.config.js), src/platform/auth/roles.ts (requireOwnerAction, requireOwnerPage), prompts/<purpose>/ for the eight [GP] purposes (prompt.md, schema.ts, budget.json, fixtures/, redteam/; 43 red-team cases), src/platform/ai-gateway/{schema-kit,copy-check,draft-guard,load-purpose,redteam}.ts, a per-purpose maxInputTokens check in the gateway, and the extended scripts/redteam.ts.check-contrast.ts, redteam.ts (8 purposes, no leak), check-copy.ts, scan-secrets.ts, check-licences.ts, check-kiro-ignored.ts. New tests: theme, roles, ai-prompts, redteam.data-theme from a settings control (only reading the stored choice exists), Zod parsing (structural schemas used), the H4 hook run, ESLint execution of no-raw-hex (tested with a fake context only), real model output (the Simulator returns fixtures), and the GitHub CI run.0004_job_lease_ai_usage.sql (job lease, last_error, ai_usage, claim_job() replaced), src/platform/jobs/index.ts, src/platform/ai-gateway/index.ts (reserve and adjust), budget-store.ts, src/platform/security/rate-limit.ts (ipKeyOf), CI concurrency group and a single test step, package.json (npm test runs node:test; Vitest and fast-check removed), vitest.config.ts deleted.node:test cases pass; migration, append-only, secrets, copy, spec-sync and red-team checks exit 0.createSqlBudgetStore, CI, ESLint, tsc.claim_job(p_max_attempts) attempt ceiling), runJob returns unsettled and masks emails and digit runs in last_error, ipKeyOf handles hex-form mapped IPv4, the gateway reserves an output allowance, $1::uuid casts. Lease renewal was not added (see docs/decisions.md).node:test cases pass.createSqlBudgetStore, CI, ESLint, tsc.0006_job_lease_token.sql, src/platform/jobs/index.ts (lease token guard, renewLease, claim options), src/worker.ts, .kiro/steering/tech.md, tests in jobs.test.ts and migrations.test.ts.node:test cases pass; check:migrations, check:append-only, scan:secrets and check:copy exit 0.renew_job_lease against a real pool, tsc, ESLint, CI.src/modules/consent/ (types.ts, receipt, ledger with pg-store.ts, verifier, gate with basis.ts) and tests consent-receipt, consent-ledger, consent-verifier, consent-gate, consent-ledger-property plus the helper tests/unit/consent-fakes.ts. Requirement ids: AC-R12.1, AC-R12.2a, AC-R12.2b, AC-R12.4d, AC-R12.6a, AC-R12.6b, AC-R36.1 to AC-R36.9, AC-R36.13, AC-R37.1 to AC-R37.9, AC-R37.12.npm test passes; Property 8 (tamper, stored and exported) and the swap check run 150 iterations each, seed printed on failure (FAST_CHECK_SEED replays). Removing the lock from the in-memory store makes the concurrency model fail. tasks.md 14.1, 14.2, 14.4, 14.5 and 14.6 ticked.createPgConsentStore SQL (no Postgres), tsc, ESLint. Task 14.3 is not ticked: the property here is an in-memory model of the serialised append, not N parallel appends against real Postgres.src/modules/drafts/index.ts (DraftService, withdrawal service, link builders), src/platform/jobs/index.ts and src/worker.ts (lease renewal timer), src/modules/consent/ledger/index.ts (appendMany), gate/basis.ts (atomic recordSelfQr), verifier/index.ts (keysTrusted), src/platform/tenancy/index.ts (TxRunner). Tests: drafts, withdrawal, drafts-gate-property (Property 5), withdrawal-property (Property 10), plus new cases in jobs, consent-gate, consent-verifier and helpers drafts-fakes.ts, consent-fakes.ts (rollback on throw). Requirement ids: AC-R11.2a, AC-R11.2b, AC-R11.3, AC-R11.5, AC-R11.6, AC-R11.10, AC-R12.4a, AC-R12.4b, AC-R12.4d, AC-R36.1, AC-R36.6, AC-R36.10, AC-R39.1 to AC-R39.4, AC-R41.1.npm test 283 passing. Properties 5 and 10 run 120 iterations each and print the seed on failure. Removing the gate call from approve, or limiting withdrawal blocking to waiting, makes them fail. check:copy, scan:secrets, check:migrations, check:append-only and spec:sync exit 0. tasks.md 16.1 to 16.4 ticked; 16.5 (Approval_Desk page) is not built.withLock rollback and of any TxRunner, tsc, ESLint, CI. No Postgres DraftStore, PersonDirectory or TxRunner exist yet.src/modules/identity/index.ts (phone and email normalisation, resolver, undo, in-memory store). Tests: identity, identity-order-property (Property 4), identity-role-property (Property 15). Requirement ids: AC-R8.1, AC-R8.2, AC-R8.3, AC-R8.4, AC-R8.5, AC-R8.6.npm test 295 passing. Properties 4 and 15 run 150 iterations each and print the seed on failure. check:copy, scan:secrets and spec:sync exit 0. tasks.md 17.1 to 17.3 ticked; 17.4 (Review_Queue page) is not built.tsc, ESLint, CI, any Postgres store for people and merges.src/modules/drafts/index.ts (withdrawal saveIf with bounded retry, block returns CHANGED_REASON on a lost race, per-line stripFooter, DraftStore comment), src/modules/identity/index.ts (undone pairs hold for whole clusters). Tests added in drafts, identity; withdrawal stub now fails saveIf. Requirement ids: AC-R8.3, AC-R12.4b, AC-R11.10.npm test 304 passing; each new test fails with the source changes stashed. check:copy, scan:secrets, spec:sync exit 0.UPDATE ... WHERE status = $expected behaviour, tsc, ESLint, CI.src/modules/import-whatsapp/index.ts (pure parser, zip reader), tests/unit/whatsapp-parser.test.ts (16 per-variant tests), tests/unit/whatsapp-parser-property.test.ts (Property 2: bytes never throw; rendered chats round-trip in all platform, clock, date-order, year and pad variants; 150 iterations each, seed printed in test name and failures, FAST_CHECK_SEED replays). tasks.md 19.1 and 19.2 ticked. Requirement ids: AC-R5.1, AC-R5.2, AC-R5.3a, AC-R5.6, AC-R5.14.npm test 322 passing; property passes for seeds 1, 2, 3, 99, 12345 and fails when the PM offset is removed. check:copy, scan:secrets, spec:sync exit 0.tsc, ESLint, CI, real WhatsApp exports from phones in other locales, the H1 hook on save.src/modules/import-whatsapp/index.ts (chooseOrder validity first, encrypted flag check), src/modules/drafts/index.ts (last-attempt handed_over reported, saveIf transaction note). Tests added in withdrawal, identity and whatsapp-parser tests.npm test 327 passing; the four new fix tests fail with the src changes stashed.scripts/spec-sync.ts now counts ids on **Validates: Requirements ...** lines of property tasks, so AC-R1.3, AC-R25.7, AC-R5.14, AC-R8.4 and AC-R40.7 map to tasks 8.6, 17.2, 19.2 and the post-GP erasure task. Parser (src/modules/import-whatsapp/index.ts): issue gains invalid_date_order, internal_error, too_large; new refusal text and dateOrder.reason (no_order_fits); plain text and zip entries over 50 MB are refused (cap was 64 MiB for zip entries only).npm test 332 passing; with the src and scripts changes stashed the new tests fail; spec:sync reports no uncovered requirements; check:copy and scan:secrets exit 0.tsc, ESLint, CI. The deflate over-cap path (ERR_BUFFER_TOO_LARGE) is not tested, since it needs a 50 MB fixture.src/modules/import-mailbox/index.ts (parseMailbox, classifyHeaders, parseSignature, normaliseSubject) and tests/unit/mailbox-parser.test.ts. tasks.md 20.1 ticked. Requirement ids: AC-R6.1, AC-R6.2, AC-R6.3a, AC-R6.3b, AC-R6.4a.npm test passes with the new tests (one test per skip reason, threading by ids and by subject, signature rules, totality on random bytes); check:copy, scan:secrets, spec:sync exit 0.tsc, ESLint, CI, real mbox exports from mail clients, the H1 hook on save.src/modules/import-mailbox/index.ts (receipt automation marker, linear subject threading, per-mail failed, 200 MB too_large cap, signature check after closing phrases, UTF-8 fallback and windows-1252 input) and tests/unit/mailbox-parser.test.ts.npm test 361 passing, including 20000-mail threading, a nested-multipart failure isolated to one mail, and the 200 MB refusal; check:copy, scan:secrets, spec:sync exit 0.tsc (@types/node missing, Buffer is used for the size check), ESLint, CI, real mail-client mbox exports, and the Latin-1 fallback against a real export.threading_error fallback around buildThreads, every-word-capitalised name check for the signature guard, zone-less Date read as UTC. Tests added for a 30,000-mail reversed chain, short closing sentences and zone-less dates.npm test 364 passing (also under TZ=Asia/Kolkata); check:copy, scan:secrets, spec:sync exit 0.tsc, ESLint, CI, real mbox exports. The threading_error fallback is untested (no input triggers it).src/modules/next-action/index.ts (nextAction, nextActionNow, revivalExcluded) and tests/unit/next-action.test.ts. tasks.md 23.1: the unit-test sub-item is ticked; the pipeline attachment sub-item is not done and the task stays open. Requirement ids: AC-R9.2, AC-R9.2.1 to AC-R9.2.7, AC-R10.5.npm test 376 passing; without the module the new test file fails to load; flipping the 3-day boundary fails a test.tsc, ESLint, CI. Nothing calls the engine yet: the pipeline step (18.2, 21.5) and the stores that supply NextActionFacts do not exist.src/modules/revival/index.ts (detectStalled, stallReason, score, createRevivalEngine().draftRevival) and tests/unit/revival.test.ts. tasks.md 23.4 ticked. Requirement ids: AC-R10.1, AC-R10.2, AC-R10.3a, AC-R10.3b, AC-R10.4, AC-R10.5, AC-R10.6a, AC-R10.6b, AC-R10.6c.npm test 396 passing; check:copy, scan:secrets, spec:sync exit 0. Breaking the zero rule, the 70-word limit, the "Re:" thread check, the said-no refusal or the clear-no filter each fails a test.tsc, ESLint, CI. The gateway is a fake in the tests, so the real revival_draft guard (invented urgency, silence as a fault, truthful naming of the earlier conversation) is only covered by the existing gateway and prompt tests. Nothing calls the engine yet: the daily job, the Opportunity store and the Revival page (23.5) do not exist.src/modules/revival/index.ts now owns REVIVE_COOLDOWN_DAYS and revivalExclusion (cause or null); next-action and draftRevival both use it. no_contact and review actions are draftable: false. draftRevival refuses an unknown Person with a reason. stallReason returns unclear with no Evidence when quote or sourceId is empty or missing. NextActionFacts.utcOffsetMinutes (optional, default 0) sets the zone for the withdrawal date. Tests added in tests/unit/next-action.test.ts and tests/unit/revival.test.ts. Requirement ids: AC-R9.2, AC-R10.2, AC-R10.5.npm test 401 passing; check:copy, scan:secrets, spec:sync exit 0. With the src changes stashed, the two new next-action tests fail and the revival test file fails to load (it imports the new revivalExclusion).tsc, ESLint, CI. prompts/stall_reason/schema.ts uses str(...) with a max length only and was not changed, so empty strings pass it; the check is in stallReason.src/modules/import-mailbox/index.ts: HTML bodies (single or multipart with no text/plain part) are reduced to text; ParsedMail.bodyEmpty flags a kept mail with no body text; the mbox separator is a real From_ line (From addr Day Mon dd hh:mm:ss yyyy) with or without a blank line before it; the closing --BB-- multipart part no longer counts as an empty text/plain part. Tests added in tests/unit/mailbox-parser.test.ts.npm test 404 passing; check:copy, scan:secrets, spec:sync exit 0. With the src change stashed, the HTML and mbox tests fail. The closing-line-after-Thanks test passes on the old code too: that gap was already fixed, so it is a regression guard only.tsc, ESLint, CI. Real-world HTML (nested tables, inline CSS) is only covered by the simple cases in the tests.src/platform/tenancy/pg-tx.ts, src/modules/drafts/pg-store.ts, src/modules/identity/pg-store.ts, src/modules/revival/pg-store.ts; TxClient in src/platform/tenancy/index.ts gained optional scoped. Tests in tests/unit/pg-adapters.test.ts (recording fake client): saveIf SQL shape and false on rowCount 0, subject round trip, parameterised SQL and no writes to append-only tables, identity uuid mapping and merge pruning, one transaction per call chain, rollback and release on throw. Requirement ids: AC-R11.2a, AC-R12.4a, AC-R12.4b, AC-R25.1, AC-R26.1a.npm test 404 passing before the change; npm test 414 passing after (10 new); check:copy, scan:secrets, spec:sync exit 0. No adapter was run against Postgres.tsc, ESLint, a real pg.Pool (the PgPool and PgConnection shapes follow node-postgres from memory), and concurrent behaviour of saveIf under real locking.src/modules/upload/index.ts, src/modules/extract/pipeline/index.ts, tests/unit/upload.test.ts (17 tests, one per refusal) and tests/unit/pipeline.test.ts (6 tests over Simulator fixtures). tasks.md: 18.2 ticked; 18.1 left open because the S3 adapter and private bucket are not built. Requirement ids: AC-R29.1 to AC-R29.5a, AC-R29.7, AC-R29.8, AC-R41.2, AC-R31.5, AC-R31.6, AC-R32.4, AC-R32.5, AC-R36.8.npm test 437 passing (414 before); check:copy, scan:secrets, spec:sync exit 0. Both new test files fail to load without their modules.tsc, ESLint, CI. Hooks for next action and drafts are empty until 21.5 and 23.1.src/modules/today/index.ts, src/modules/people/search.ts, tests/unit/today.test.ts, tests/unit/people-search.test.ts; src/modules/import-mailbox/index.ts (blockquote dropped in HTML, empty text/plain falls back to HTML, counts with bodyEmpty on the result); tests added to mailbox-parser.test.ts and next-action.test.ts (UTC fallback pin). tasks.md: 23.2 ticked. Requirement ids: AC-R9.4c, AC-R9.5, AC-R34.9, AC-R6.3a.npm test 448 passing (437 before); check:copy, scan:secrets, spec:sync exit 0. With the mailbox src change stashed, the three new mailbox tests fail; the two new modules' tests cannot load without their modules. The UTC fallback test is a pin and passes on old code.tsc, ESLint, CI.npm test 456 passing; 8 new tests in pg-adapters, pipeline, upload and mailbox-parser fail without the src changes.tsc, ESLint, CI.src/platform/storage/s3.ts (createS3Storage, presignUrl, ecsTaskRoleCredentials) and tests/unit/s3-storage.test.ts (10 tests). SigV4 with node:crypto, no AWS SDK. Requirement ids: AC-R28.1a, AC-R29.1, AC-R29.5a. tasks.md: 18.1 and 9.1 left open (private bucket, content-length policy and the wiring into a composition root remain).tsc, ESLint, CI.src/modules/scheduler-jobs/{index,pg-store}.ts, db/migrations/0007_expired_demo_workspaces.sql, tests/unit/scheduler-jobs.test.ts (8 tests); tests/unit/migrations.test.ts updated for 0007 and 7 definer functions. Requirement ids: AC-R32.6, AC-R13.2b, AC-R10.1. tasks.md 23.6 left open (pg delete missing, see decisions.md).npm test 473 passing (466 before); check:migrations, check:copy, scan:secrets, spec:sync exit 0.tsc, ESLint, CI.src/platform/storage/s3.ts, src/platform/ports/index.ts, src/modules/upload/index.ts, src/modules/scheduler-jobs/{index,pg-store}.ts; 9 new tests in s3-storage, upload and scheduler-jobs tests, and the pg demo store test updated for the new query. Requirement ids: AC-R29.1, AC-R29.5a, AC-R13.2b, AC-R32.6. tasks.md unchanged (18.1 and 23.6 stay open).src stashed. check:copy, scan:secrets, spec:sync exit 0. npm test: only migrations are numbered 0001 to 0007 fails, because an untracked db/migrations/0008_pipeline_facts_review_items.sql from other work is in the tree; not part of this commit.tsc, ESLint, CI.db/migrations/0008_pipeline_facts_review_items.sql (facts gain import_ref, source_ref, quote, confidence_label; new review_items with forced RLS), src/modules/extract/pipeline/pg-store.ts (createPgFactStore, createPgReviewQueue), src/composition.ts (compose: S3 adapter into selectPorts, pipeline and scheduler handlers keyed by queue, schedules), tests/unit/pg-fact-store.test.ts, tests/unit/composition.test.ts, tests/unit/ledger-concurrent-pg.test.ts; tests/unit/migrations.test.ts updated for 0008. Requirement ids: AC-R31.5, AC-R31.6, AC-R25.1, AC-R28.1a, AC-R28.2b, AC-R32.6, AC-R12.2b, AC-R37.7.recordCardGiven calls in a fresh workspace and checks seq 1..N, the prev_hash chain from the genesis value and each recomputed hash. It skips unless AP_TEST_DATABASE_URL is set and imports pg, which is not installed. It has never run. 14.3 stays unticked because the property has not run against a real Postgres.tsc, ESLint, CI. Revival persistence (pg-store) exists; the Worker is not started anywhere, so nothing calls compose yet.S3ObjectTooLarge moved to the ports module. Decisions recorded in docs/decisions.md. Postgres paths remain unverified.db/migrations/0010_demo_copy_purge.sql (role ap_demo_purger, purge_demo_workspace(uuid) SECURITY DEFINER, reject_mutation() allows a flagged row DELETE by that role only), tests/unit/demo-purge-pg.test.ts (5 guarded Postgres tests); createPgDemoCopyStore.delete now calls the function and takes an optional onPurged(id, counts); new tests in scheduler-jobs and migrations (purge list covers every workspace_id table in foreign-key order, ownership, grants, expiry guard, trigger guard). Decision in docs/decisions.md. Requirement ids: AC-R13.2b, AC-R32.6. tasks.md: 23.6 ticked on the unit tests.npm test 506 passing, 6 skipped (the Postgres tests); check:migrations, check:append-only, check:copy, scan:secrets, spec:sync exit 0.tsc, ESLint, CI.workspaces_demo_expiry_immutable trigger. DemoCopyNotDue added to scheduler-jobs; the handler skips it without failing. createPgDemoCopyStore documents the autocommit requirement. docs/decisions.md: earlier "Open gap" bullet restored, corrections appended. New tests in migrations, scheduler-jobs and a guarded pg test. failIfAny doc comment moved back above the function.tsc, ESLint, CI.src/pg-client.ts (lazy pg pool factory), src/platform/health/index.ts and app/api/health/route.ts, src/platform/security/edge-guard.ts and middleware.ts, runWorker, abortOnSignals, abortableSleep in src/worker.ts (drain takes a stop callback), runScheduler in src/scheduler.ts, loadConfig and ecsCredentialsUriFromEnv in config. New tests: worker-loop, health, edge-guard, plus one in config. tasks.md: 7.4 and 7.5 ticked; 8.5 not.npm test 530 passing, 7 skipped, 0 failed; check:copy, scan:secrets, spec:sync, check:migrations, check:append-only, check:kiro exit 0.pg and Postgres, process entry points (none exist yet), tsc, ESLint, CI. Open owner decision: Scheduler workspace listing (docs/decisions.md).src/platform/auth/{password,session,signup,handlers,pg-store}.ts, src/auth-server.ts, migration 0011_auth.sql (users, sessions, six auth_* definer functions), app/{layout.tsx,auth.css,signin/page.tsx,signup/page.tsx}, app/api/auth/{signin,signup,signout}/route.ts, tests/unit/auth.test.ts; migrations.test.ts updated for 0011 (14 definer functions, purge guard scans files before 0010).npm test 550 passing, 7 skipped, 0 failed (the new tests fail when the credential check is removed); check:copy, scan:secrets, spec:sync, check:migrations, check:append-only exit 0.tsc, ESLint, axe, CI. Task 11.1 stays unticked: better-auth is not used (AC-R33.7). Owner decision in docs/decisions.md.0012_auth_login_role.sql (role ap_web_login; the three credential functions revoked from ap_app; new four-argument auth_create_account; session cap in auth_create_session; purge_expired_sessions()); AUTH_DATABASE_URL in config, .env.example and createPgClient({ urlKey }); per-email sign-in limiter, fail-closed missing address (clientIp returns null), ASCII-only email, uniform sign-up response with /signin?notice=account_ready, sessionGate and requireSession, purgeExpiredSessions; middleware nonce CSP, x-nonce, 303 to /signin without a session cookie, 400 for a public route without an address; app/layout.tsx uses the nonce; src/platform/auth/cookie.ts split from session.ts. Tests added in auth.test.ts, edge-guard.test.ts; migrations.test.ts and config.test.ts updated.npm test 563 passing, 7 skipped, 0 failed (reverting the ASCII lowercase, the null client address or the REVOKE makes tests fail); check:migrations, check:append-only, check:copy, scan:secrets, spec:sync exit 0.tsc, ESLint, CI. Provisional defaults are marked in docs/decisions.md.0013_list_workspace_ids.sql; createPgWorkspaceLister in src/modules/scheduler-jobs/pg-store.ts; src/processes.ts (runProcesses); src/main-worker.ts and npm run start:worker; tests/unit/processes.test.ts; migrations.test.ts updated (0013, 18 definer functions). Decisions in docs/decisions.md (provisional, pending owner confirmation).npm test 569 passing, 7 skipped, 0 failed; check:migrations, check:append-only, check:copy, scan:secrets, spec:sync exit 0.pg, tsc, ESLint, CI. The entry throws at start-up until pipeline and revival adapters exist (jobDeps). Task 8.5 stays unticked.src/job-deps.ts (buildJobDeps, createPgImportSources, createPgRevivalStore, stand-in gateway createUnavailableGateway / GatewayUnavailableError); src/main-worker.ts no longer throws in jobDeps() and starts both loops with workspace ids from list_workspace_ids(); tests/unit/job-deps.test.ts (new), processes.test.ts updated. Decisions in docs/decisions.md.npm test, check:migrations, check:append-only, check:copy, scan:secrets, spec:sync run (see commit).pg, S3 and real signals, tsc, ESLint, CI. Gap: no live AI Gateway (Bedrock text adapter and pg budget assembly), so extract and revival jobs retry until one exists. Task 8.5 stays unticked: its integration tests against Postgres have not run and the AI-backed queues cannot complete.src/views/{imports,imports-store,revival,revival-store}.ts; server wiring src/web-data.ts; pages app/imports/{page,loading}.tsx, app/imports/[id]/page.tsx, app/revival/{page,loading}.tsx, route app/api/revival/revive/route.ts; page styles appended to app/auth.css. Pages call requireSession and redirect to /signin. Not built: Today (no Postgres TodayStore), Approval_Desk, Review_Queue, People/Pipeline, public pages, Settings, shell.npm test 592 passing, 7 skipped, 0 failed (tests/unit/views-imports.test.ts, tests/unit/views-revival.test.ts). Not run, unverified: the pages and route under Next.js, the SQL against Postgres, tsc, ESLint, axe, e2e. Tasks 18.3 and 23.5 stay unticked because they also require e2e and a11y suite entries.src/views/{today,today-store,approvals,approvals-store,review,review-store,people,people-store,imports-new}.ts; wiring in src/web-data.ts (loadToday, approvalDeps); pages app/page.tsx (Today), app/approvals, app/review, app/pipeline, app/people, app/people/[id], app/imports/new with loading.tsx files; route app/api/approvals/route.ts (same-origin and session checked). Fixes the dead links to /approvals, /pipeline and /imports/new. Today needed a new reader for per-Person next-action facts (loadPersonFacts).npm test 627 tests, 620 passing, 7 skipped, 0 failed (new: views-today, views-approvals, views-review, views-people, views-imports-new); check:migrations, check:append-only, check:copy, scan:secrets, spec:sync exit 0. Not run, unverified: pages and route under Next.js, every new SQL statement against Postgres, tsc, ESLint, axe, e2e. Tasks 16.5, 17.4, 23.3, 18.3 and 39 stay unticked: they need e2e and a11y entries, and 17.4 lacks confirm, edit, reject and merge; /imports/new cannot upload./approvals and /revival; logFailure in src/web-log.ts used by pages and POST routes; devFallbackIp; assertWebConfig with instrumentation.ts; static-asset exclusion in the middleware matcher; batched recent-interaction query, a 500 row cap and fail-closed clear no (CLEAR_NO_UNKNOWN) in src/job-deps.ts.npm test; check:migrations, check:append-only, check:copy, scan:secrets, spec:sync. Tests changed in views-approvals, views-revival, edge-guard, config, job-deps.docs/decisions.md.scripts/redteam.ts read argument 2 as a directory, so H4 always reported "no purposes yet". The script now accepts a purpose name (new test in tests/unit/redteam.test.ts).npm test 625 passing, 7 skipped, 0 failed; check:copy, scan:secrets, check:migrations, check:append-only, spec:sync, check:kiro, check:contrast, check:licences, redteam exit 0.tsc, Kiro or GitHub CI. Ticks mean the unit-level Done-when is met and passes offline; the unverified parts are named in each build-notes line.package.json gains next, react, react-dom, pg, @types/react, @types/react-dom, @types/pg; tsconfig.json gains jsx: preserve and includes app, components, middleware.ts, instrumentation.ts, next-env.d.ts; eslint.config.js gains ignores and a tests/** override; src/platform/storage/s3.ts reads time through the clock module; scripts/check-licences.ts exempts @img/sharp-libvips-* (new test). Decisions in docs/decisions.md.npm test and every CI check script (see commit); all exit 0 offline.npm install, npm run lint, npm run typecheck, next build, and the GitHub checks job. Its logs are not readable (403), so the cause is inferred. If the job still fails, the first thing to read is the failing step in the Actions run.parseArg in scripts/redteam.ts with a test. Decisions in docs/decisions.md.npm ci, tsc, ESLint and CI remain unrun (no registry).components/shell-model.ts, components/shell.tsx, components/shell.css (status badges, summary slot, skeleton, empty/error/offline/partial states, Simulated label, Evidence popover, Not legal advice banner, touch targets, live region); src/views/settings.ts, src/views/settings-store.ts, app/settings/page.tsx, app/api/settings/route.ts, settingsStore in src/web-data.ts; migration 0014_workspace_consent_notice.sql.npm test 656 tests, 649 passing, 7 skipped, 0 failed (new: shell-components, settings); check:migrations, check:append-only, check:copy, scan:secrets, spec:sync exit 0. Migration test now expects 0001 to 0014.requireGrievanceContact is built and tested but not wired to Event or Import creation, which do not exist yet. (2) The stored default Consent_Notice text is not yet read by the consent flow. (3) Column is named default_notice_text because check-append-only matches any consent_* identifier in a migration. (4) Existing pages are not migrated onto the shared components.src/views/events.ts, events-store.ts, public-consent.ts, public-store.ts; src/platform/security/pow.ts; pages app/events/*, app/c/e/[eventToken], app/c/r/[receiptToken]; routes app/api/events, app/api/c/e/[eventToken], app/api/c/r/[receiptToken]; components/public.css; publicDeps, eventStore, dataPool in src/web-data.ts; public prefixes in edge-guard.ts; migration 0015_event_notice_text.sql; recordSelfQr takes an optional evidenceRef; RECEIPT_COLS, EVENT_COLS, toReceipt exported from the consent pg-store. requireGrievanceContact is now called by Event creation.npm test 688 tests, 681 passing, 7 skipped, 0 failed (new: events, public-consent, pow, public-store, plus edge-guard and migration cases); check:migrations, check:append-only, check:copy, scan:secrets, spec:sync exit 0.resolve_public_token through the pool and createPgTx joins), tsc, ESLint, axe, e2e.docs/decisions.md). (2) e2e tests and a11y suite entries for 15.1 to 15.3 are not written, so none of 15.1 to 15.3 is ticked. (3) The Visitor_Form needs JavaScript for the proof of work. (4) The form does not verify that a phone or email belongs to the visitor. (5) Event token is derived from the master key, not random (AC-R25.6 wording). (6) Import creation still does not call requireGrievanceContact. (7) The retention sentence on the receipt describes periods that the retention job (Post-GP) does not yet enforce (OI-1). (8) Navigation to /events is not added to the existing home page.src/views/import-flows.ts (WhatsApp flow: export help, date order question, "Which of these is you?" with count and range, group chat refusal; mailbox flow: filter report with reasons, threads, "You owe a reply"); /imports/new now takes settings, shows the export help and refuses with the grievance message when no contact is set (requireGrievanceContact wired to import start); tests views-import-flows, import-idempotency-property.npm test 698 tests, 691 passing, 7 skipped, 0 failed; check:migrations, check:append-only, check:copy, scan:secrets, spec:sync, check:kiro, check:contrast exit 0./imports/new page under Next.js, tsc, ESLint, axe, e2e./imports/new: the Web process has no storage adapter or import-start path, so the page still says nothing is uploaded. (2) chat_extract and email_extract windows, promise list with overdue marks, and recording import_existing_conversation: need the AI gateway and the import pipeline from 18.2 wired to storage. (3) Date order and sender answers have no form or route yet. (4) e2e and a11y entries not written. (5) Idempotency property covers parse and view stages only; stored people, identities, facts and source items need the pipeline and Postgres. (6) Tasks 18.3, 19.3, 20.2, 20.3 stay unticked, each with a Remaining note. (7) "You owe a reply" needs the user's own addresses, which are not stored in settings yet; the view takes them as an argument./c/e/ and /api/c/e/ (BOOTH_PREFIXES in edge-guard.ts); ?error= codes mapped to fixed text on the Visitor_Form (FORM_ERRORS) and /settings (SETTINGS_ERRORS); withdrawAction skips purposes already withdrawn; the settings store reads the audit before inside the update transaction with FOR UPDATE; task 11.3 unticked with a corrected Remaining note. Tests added in edge-guard, public-consent.npm test 694 pass, 0 fail, 7 skipped; check scripts pass. Next.js, tsc, ESLint and Postgres are not available, so pages, routes and the new SQL (including FOR UPDATE) are unrun.docs/decisions.md); (2) receipt tokens have no expiry and are not deleted on erasure; (3) proof of work shares CONSENT_MASTER_KEY; (4) the new SQL and the createPgTx join need a run against Postgres, including a rollback case for a failed submit; (5) withdrawal buttons do not say that a withdrawal reaches all forms.checks job failed at npm run typecheck. This fix was made from the CI annotations without a local tsc (typescript is not installed and there is no registry access), so it is unverified by tsc until CI reruns..d.ts files for the three eslint-rules/*.js rules; defineSchema<...> type argument in factsSchema; [] as string[] fallback in scripts/spec-sync.ts (a never[] union made includes take never); typed test fixtures in mailbox-parser, auth, and consent-receipt tests; actions/checkout and actions/setup-node bumped to v5.npm test run locally. More type errors may remain beyond the 10 annotations GitHub shows.build job runs npm install and npm run build (next build) on Node 22 with no secrets and no database. A pass shows the app compiles under Next 15: route and page exports, async params, searchParams, headers(), the edge middleware import chain, and Next's own type check.params and searchParams are typed as Promises and awaited; headers() is awaited; every page and route that touches data exports dynamic = "force-dynamic"; the middleware chain (edge-guard, headers, rate-limit, auth/cookie, config, clock) imports no node: module; node:crypto is used only in server-side files (theme/init-script.ts via the layout); there are no "use server" or "use client" files.next.config.mjs (serverExternalPackages: ["pg"], eslint.ignoreDuringBuilds because ESLint runs in the checks job and the repo config has no Next plugin, poweredByHeader: false); added the build job to .github/workflows/ci.yml.next build itself cannot run here (no registry). Next may rewrite tsconfig.json on first build in CI; that is not committed.postgres job starts a postgres:16 service, runs npm run db:migrate (scripts/migrate.ts) as the postgres superuser, runs it a second time and requires 0 applied (idempotent), then runs npm test with AP_TEST_DATABASE_URL set so the Postgres-guarded files run instead of skipping. A pass shows: migrations 0001 to 0015 apply in order on a real server with the roles ap_migrator, ap_app, ap_definer, ap_demo_purger and ap_web_login; purge_demo_workspace guards and removes every tenant table including the append-only ones (demo-purge-pg); concurrent ledger appends form one gap-free hash chain under forced RLS (ledger-concurrent-pg, Property 14); and the new pg-integration file passes.scripts/migrate.ts: each file is one simple query with a schema_migrations insert appended, so a file applies and is recorded together or not at all. It takes the URL as an argument (the lint rule forbids reading the environment outside src/platform/config). A failure names the file.pg-integration covers: the auth functions as ap_web_login (create, find, session, password update, duplicate email as 23505, delete) and the createPgAuthStore adapter; ap_app refused on the three sign-in functions and no table grants on users or sessions; list_workspace_ids and expired_demo_workspaces separating real, live demo and expired demo workspaces; the purge_demo_workspace refusal and NULL cases; drafts saveIf true and false and RLS isolation; settings update under FOR UPDATE with two concurrent edits; createPgTx rolling back a person and identity written through the public-consent writer and refusing a run across two workspaces; and resolve_public_token by kind and hash.ledger-concurrent-pg now opens its pool with -c role=ap_app, so RLS applies even though CI connects as a superuser (a superuser bypasses RLS). demo-purge-pg needed no SQL changes: its columns and grants match 0001 to 0015.postgres job has passed once; then tick them from its log. (2) The pg tests leave workspaces behind (append-only tables block deletes); fine for the throwaway CI service, never point AP_TEST_DATABASE_URL at a shared database. (3) No test yet runs the Worker role (claim_job, lease renewal) or the purge_expired_sessions function against Postgres. (4) auth_create_session's keep-newest-10 rule is not covered.build job: next build passes. postgres job: migrations 0001 to 0015 applied on postgres:16, the re-run applied 0, and npm test with AP_TEST_DATABASE_URL gave 712 pass, 0 fail, 0 skipped (including ledger-concurrent-pg, demo-purge-pg, pg-integration). checks job failed only at typecheck: pg-integration.test.ts line 327 passed "withdrawal", which is not a TokenKind ("visitor_form" | "receipt"). The "kind must match" assertion now uses "visitor_form" with the same hash; it still expects null.claim_job test), 8.3 (UPDATE/DELETE rejection on consent_receipts and consent_events, forced RLS test), 8.5 (claim_job, lease renewal, idempotency key, backoff), 8.6 (no property test), 11.1 (sign-up creating workspace and owner, purge_expired_sessions, keep-newest-10 sessions).npm test 696 pass, 0 fail, 16 skipped (no local Postgres). tsc is not installed locally, so the typecheck fix is confirmed by CI only.claim_job, lease renewal, purge_expired_sessions, session cap, append-only on the consent tables, forced-RLS check, tenant isolation property (8.6).tests/unit/pg-helpers.ts, tests/unit/pg-jobs-sessions.test.ts, tests/unit/pg-schema-rls.test.ts. All skip without AP_TEST_DATABASE_URL.postgres job must prove (tests by name):claim_job returns only the job columns and its workspace, and the app role cannot read the job without that workspace (8.2, 8.5).claim_job (8.5).auth_create_session keeps only the newest 10 sessions per user (11.1).purge_expired_sessions removes expired sessions and keeps live ones (11.1).consent_receipts and consent_events reject UPDATE, DELETE and TRUNCATE (8.3).workspace_id column, and workspaces, has RLS enabled and forced, with a policy (8.3).postgres job passes these tests: 8.2, 8.3, 8.5, 8.6, 11.1. Their Remaining notes now name the test files.tsc and eslint from the sandbox. The first CI run is the first execution.src/modules/cards/index.ts (extractCard, extractCards), src/views/card-review.ts (buildCardReview, buildBatchReview), tests in tests/unit/cards.test.ts and tests/unit/views-card-review.test.ts. They use the real card_extract purpose with a Simulator text port.extracted, unreadable (no text in any region, or the model sets unreadable), not_a_card (readable but no name, organisation, phone or email), failed (the gateway refused; the code is kept). Each card is one gateway call, so one card never stops the next.CardRegion). Turning an image into regions is the Vision port's job and is not wired, so no caller exists yet.tsc and eslint have not run on the new files; CI is the first run.0016_mcp_key.sql (kind mcp_key on public_tokens, one key per workspace index), src/modules/mcp-key (createMcpKey, verifyMcpKey, Postgres store), POST /api/settings/mcp-key, a create button on /settings, tests in tests/unit/mcp-key.test.ts and tests/unit/pg-mcp-key.test.ts. Migration counts in migrations.test.ts, migrate-script.test.ts and the pg test headers now say 0016. Table choice is in docs/decisions.md.mcp_key.create Audit_Log row with no key material.postgres job to pass pg-mcp-key. tsc, eslint and next build have not run on the new files, and the route response page is unverified in a browser.playwright.config.ts, tests/e2e/{fixtures,auth.spec,public-consent.spec}.ts, the e2e job in .github/workflows/ci.yml, devDependencies @playwright/test and @axe-core/playwright. Ticked 8.2, 8.3, 8.5, 8.6, 11.1 and 26.1 after checking each Done-when against the pg tests. claimMine restore now adds AND status = 'running'; the lease renewal test uses a 30 s lease.tsc on them and the e2e job have never run. Selectors come from reading the pages. First CI run may need fixes: axe findings, the receipt withdrawal redirect text, and login role creation. package-lock.json is not regenerated (CI uses npm install).mcp/server.ts (eight tools, auth, refusals), mcp/rpc.ts (JSON-RPC adapter), seed/ (buildSeed, checkSeed, refresh.ts, chat and mailbox generators), src/modules/demo/index.ts (personas, planDemoCopy, signInAsPersona, DemoStore port), src/modules/demo/actions.ts (five Demo_Actions), npm run demo:refresh (hook H9 is now live because src/modules/demo exists). Tests: tests/unit/mcp-server.test.ts (20), tests/unit/seed.test.ts (8), tests/unit/demo.test.ts (15). mcp/ and seed/ were added to tsconfig.json include.npm test (794 tests, 0 fail, the rest skipped without AP_TEST_DATABASE_URL), check:copy, check:kiro, scan:secrets, check:contrast, check:migrations, check:append-only, spec:sync, redteam, demo:refresh.tsc, eslint and next build have not run (no registry). CI is the first run of these files.DemoStore (insert workspace, member, events with visitor_form tokens, captures as people and receipts, the opportunity) and the sign-in route (POST /api/demo/<persona> that sets the session cookie) are not built. Without them there is no integration test of "two sign-ins give two isolated copies"; the unit test proves the plans and derived keys differ. Needs a decision on how seeded captures get consent receipts (signed with the copy's key through recordCardGiven or recordSelfQr).SampleImporter adapter (feed the seed text through the upload and pipeline path), the boothToken adapter (eventToken(masterKey, ws, eventId) of the open Event), the Demo_Action buttons and routes, and pg integration tests. The unit tests cover each outcome against the in-memory consent, draft and receipt fakes, including the stored ledger unchanged after tamper.TimelineStore, ImportStatusStore and RevivalCandidateSource (compose OpportunityStore, detectStalled, stallReason, score), the McpScope binder (withWorkspace plus the stores that already exist), and the stdio entry (mcp/main.ts: read MCP_KEY through the Config_Module, newline-delimited JSON on stdin and stdout). Unit tests cover every tool, every refusal and the adapter.ci.yml now has workflow_dispatch only. Decisions for the trigger and the deploy path are in docs/decisions.md.tsc, eslint, next build and the e2e job are all unverified until someone runs the workflow by hand.infra/ CDK app (stack, assertion tests, parameters.json), Dockerfile, .dockerignore, docker-compose.yml, Caddyfile, scripts/deploy/ (push-and-deploy.sh, deploy.sh, load-env.sh), tests/unit/deploy-assets.test.ts, docs/aws-setup.md; infra/** added to the ESLint ignores (the root tsconfig never included it).npm test (new static checks pass); check:copy and scan:secrets. Not run: cdk synth, the infra tests, docker build, docker compose up, the shell scripts against AWS (only bash -n). Tasks 12.1 to 12.3 stay unticked.src/platform/storage/s3.ts and src/main-worker.ts before the first deploy. (2) Login users ap_app_login and ap_web_login_user and the ap_migrator membership for ap_admin are manual SQL steps (docs/aws-setup.md section 7); PostgreSQL 16 SET ROLE behaviour on RDS is unverified. (3) Bucket lifecycle expires every object after 7 days because uploads have no raw prefix. (4) The scheduler service runs the same process as worker. (5) No live AI adapter or Bedrock permissions yet. (6) Public IPv4 and cost figures in the guide are estimates. (7) The OIDC deploy role in the task text was replaced by the option A role.src/platform/ai-live/bedrock.ts (createBedrockText, createBedrockVision), signJsonRequest in src/platform/storage/s3.ts, bedrockFactories in src/composition.ts, tests/unit/bedrock.test.ts (6 tests: signed headers, body, async credentials, error redaction, image format, factory gating). selectPorts now gates live AI on the factory instead of an API key, and parseEnv no longer demands AI_TEXT_API_KEY for AI_MODE=live. docs/aws-setup.md Bedrock section updated.npm test (780 pass, 0 fail), check:copy, redteam, scan:secrets. Not run: real Bedrock, tsc, eslint.mcp/main.ts and Postgres adapters, 25.2, 27 Kiro power. Their earlier Remaining notes stand.main-worker.ts yet: the stand-in Gateway there still fails jobs retryably (see decisions, "Open gap: no live AI Gateway"); passing ports.text into the Gateway needs a pg BudgetStore assembly. (2) Default model anthropic.claude-3-haiku-20240307-v1:0 is a guess; model access and region (ap-south-1) must be confirmed. (3) The host role needs bedrock:InvokeModel; the CDK stack does not grant it yet. (4) Replies must be bare JSON (a code fence is tolerated), otherwise the call throws.ec2InstanceRoleCredentials (IMDSv2) in src/platform/storage/s3.ts sharing a cached refresh helper with the ECS provider; ec2Credentials option in src/composition.ts; ec2CredentialsFromEnv in config; worker sets AP_CREDENTIALS_SOURCE=ec2 in docker-compose.yml; CDK host role gets bedrock:InvokeModel and the instance hop limit 2. Closes parked item (1) of the 12.1 to 12.3 entry and the CDK part of the Bedrock gap.npm test (784 pass, 0 fail, 31 skipped). New tests: IMDSv2 flow and failure cases, composition with ec2Credentials, env flag, infra assertion for hop limit and Bedrock (infra tests not run, no registry).cdk synth, tsc, eslint.main-worker.ts Gateway; 21.2, 25.2, 26.2, 27 not attempted.src/live-gateway.ts (loadAllPurposes, buildLiveGateway), wired in src/main-worker.ts through buildJobDeps({ gateway }); tests/unit/live-gateway.test.ts (5 tests). The Gateway uses the Postgres BudgetStore, a late-bound text port (Simulator or Bedrock from compose), and logs each call. A Simulator text port is refused when NODE_ENV=production and SANDBOX_MODE is off.npm test (789 pass, 0 fail), check:copy, scan:secrets. Not run: real Postgres or Bedrock, tsc, eslint.web-data.ts). (2) ai call log lines mask the tokens field (the logger masks keys containing "token"). (3) No ai_calls table: calls are logged, not stored. (4) Cost rate is unset, so costMicros is 0.mcp/main.ts), 27. No GitHub Actions minutes or AWS compute were used.Written on 2026-12-01 during the task status audit. The deploy itself happened on 2026-12-01; the dates of the steps below are the owner's report, not something the audit re-ran.
ap-south-1). cdk bootstrap and cdk deploy succeeded with -c dbBackupDays=1 -c instanceType=t4g.small (stack ActionPotential, 47 resources: VPC, EC2 t4g.small with an Elastic IP, RDS PostgreSQL 16 db.t4g.micro, S3, 3 ECR repositories, alarms, a budget and a deploy role). The infra tests ran on the owner's PC after fixes (PR #24 fixed 2 assertion tests; the re-run result after that fix was not reported). The images were built on the owner's PC (ARM64 through emulation; the next build passed inside the Docker build) and pushed to ECR. On RDS, migrations 0001 to 0016 applied, and a re-run printed 0 applied, 16 already applied. scripts/deploy/push-and-deploy.sh finished with deploy: healthy on 32bde8a885d9: web, worker, scheduler and caddy started, and /api/health returned 200 on the host. The Public_URL is https://13-234-126-183.sslip.io (provisional; see docs/decisions.md, "Interim public address: sslip.io instead of an owned domain").git log; each fix is a merged PR): the requireImdsv2 and hop limit conflict and cdk bootstrap needing no stack context (PR #23); stack assertion tests that depended on resource order (PR #24); the Free plan backup limit and instance type, which added the dbBackupDays and instanceType context values (PR #25); the RDS CA not trusted, fixed with NODE_EXTRA_CA_CERTS, plus quiet deploy output with deploy.log after truncated SSM output (PR #26); missing ca-certificates in the runtime image (PR #27). PR #22 changed the guide to an IAM user instead of Identity Center.https://13-234-126-183.sslip.io answering /api/health from outside the host; browser pages; sign-up and sign-in on the real site; Bedrock live AI (the stack runs with AI_MODE=simulator); 7-day backups and t4g.medium (a deviation for the Free plan, recorded in docs/decisions.md, 2026-12-01 "Hosting on the AWS Free plan").cdk synth, docker build" are superseded for those items. cdk synth and the image build both ran on the owner's PC during this deploy. The rest of those entries stand.npm install from the registry worked and produced package-lock.json. Docker cannot run containers in the sandbox and the system disk is read-only, so Postgres 16.16 ran from the @embedded-postgres/linux-x64 binaries outside the repo, started and stopped around each command. Playwright Chromium was installed and the e2e suite ran against next start (production) plus the Worker.error=pow. POW_SCRIPT now writes the nonce on submit. The receipt e2e assertions matched the lede as well as the status; they are exact now. pg-mcp-key used fixed token values and failed on a reused database. The pg-schema-rls TRUNCATE check deadlocked with other test files; it now uses a short lock_timeout and retries./consent (task 24): stored-ledger check, event list, Ledger_Export download, uploaded-export check against this workspace's derived keys, public key with fingerprint, docs/consent.md. Upload and import (tasks 18.3, 19.3, 20.2): POST /api/imports, the question step on /imports/[id], Source_Items and pipeline start, Import result with quotes, the mailbox filter report and "You owe a reply". Rule-based Simulator extraction for chat_extract and email_extract. Decisions recorded in docs/decisions.md (2026-12-01, two entries).npm test with AP_TEST_DATABASE_URL: 850 tests, 0 skipped, all pass on most runs (one intermittent failure seen in pg-jobs-sessions "a failing job retries with backoff" under parallel load on a database with thousands of leftover rows; not investigated); next build passes; Playwright: 60 of 60 pass across desktop-1440, mobile-360 and narrow-320, including axe in four themes.captures, demo_create_user, purge with captures, users and sessions). Expo Mode /capture/[eventId] with IndexedDB Offline_Queue, service worker and manifest; POST /api/captures; capture_process Worker job (card reading, Person, card_given or staff_verbal basis, photo dropped); Event summary and capture review list on /events/[id]. Postgres DemoStore, /demo, POST /api/auth/demo, Demo actions on Today with POST /api/demo/action. Signed-in navigation in the layout.npm test with AP_TEST_DATABASE_URL: 867 tests, 0 skipped; all pass after the auth route list was updated. next build passes. Playwright on a fresh database: 90 of 90 pass across desktop-1440, mobile-360 and narrow-320, including offline capture with a service-worker reload and axe in four themes.CLEAR_NO_UNKNOWN is true); the Scheduler backlog noted in docs/decisions.md.card_read vision purpose and the Card_Reader; the capture job reads cards through it (Bedrock vision when live, Vision Simulator otherwise) and retries on budget or provider failure. Follow-up Drafts for captures the Consent_Gate allows. Migration 0018 interactions.clear_no and isClearNo; the revival store reads it and still fails closed. The owner's demo copy holds the stalled deal with its receipt. Revive uses the real engine in the Web process. Simulated follow_up_draft and revival_draft rules that pass the real draft guards.npm test with AP_TEST_DATABASE_URL: 874 of 874 pass; next build passes; Playwright on a fresh database: 96 of 96 pass on all three projects.qrcode-generator); /docs pages, a Docs_Page per GP feature and README.md; import interactions with clear-no, import_existing_conversation basis, overdue promises, next actions per person (migration 0020); identity resolution across windows and sources with anchors and possible-duplicate review items; MCP stdio entry and Postgres adapters (npm run mcp); the Kiro power in power/; hook fixes (H1, H6, H9); deploy.yml with an OIDC deploy role in infra/, daily-demo.yml, judged-branch.yml and docs/permitted-fixes.md; two ESLint rules; e2e suites for a11y, settings, approvals, review, people and pipeline, card review, the demo path and the demo targets; gallery screenshots in docs/gallery/.form-action; Approvals 819 px wide at 320 px; imports deleting every identity in the workspace; merged-away people still listed; imported people never passing the consent gate (pipeline id not a uuid); card phones not normalised; mail senders named "From"; reflected ?error= text on /events/new; the daily revival job rescoring the demo deal.npm test with AP_TEST_DATABASE_URL: 1029 of 1029; next build passes; Playwright on a fresh database: 189 of 189 across desktop-1440, mobile-360 and narrow-320; infra tests 18 of 18.docs/task-status.md (CI, Kiro, AWS and owner items).Baseline (W0-01): CI on main at ae58db8 (PR #50 merged), run 47060106620. Job times:
| Job | Time | Result |
|---|---|---|
| checks | 0 m 56 s | pass |
| infra | 0 m 34 s | pass |
| build | 1 m 10 s | pass |
| docker | 2 m 12 s | pass |
| unit-windows | 2 m 35 s | pass |
| unit (Postgres) | 4 m 7 s | pass |
| e2e desktop-1440 | 17 m 6 s | pass |
| e2e mobile-360 | 14 m 57 s | pass |
| e2e narrow-320 | 14 m 20 s | 1 failure: card-review.spec.ts, the reticle offset (−61 px) |
The previous run (476408c) failed the same way in stitch-board.spec.ts at mobile-360 (−495 and −554 px).
Cause of the red e2e job (W0-02): both specs read the outline's box and the photo's box in two separate calls. Focusing a field scrolls the page, smoothly at the full motion level, so a scroll step could fall between the reads. Both specs now read the two boxes in one frame. card-xray.tsx also stopped setting state during render (the remembered box moved into an effect). Both reticle tests passed 4 to 5 runs in a row at 320, 360 and 1440 px.
Contracts (W0-03): ten contract files with NotBuilt stubs, listed in src/platform/contracts.ts (CONTRACTS); SIGNUP_OPEN (default false) in config, .env.example, infra/parameters.json and docs/aws-setup.md, read by /pricing. tests/unit/cr2-contracts.test.ts.
Nav and tour (W0-06): /campaigns in the owner nav model, hidden (CAMPAIGNS_IN_NAV = false); /admin?tab=integrations and /trust#trust-passport-h allowed as demo deep links; tour step 8 pinned to /consent#passport-wallet.
AppPage (W0-07): components/shell/app-page.tsx and styles/shell.css. On a scratch conversion of /review (reverted), the page matched the /pipeline head and passed axe in four themes with no sideways scroll at 1440, 360 and 320 px. Converting a page changes the .app-lede and bare h1 selectors its specs use; page owners update those specs when they convert (W2).
Decisions D1 and D2 recorded (owner), D3 to D9 actions recorded (docs/decisions.md, Addendum 02 section 9.0).
/projects/sandbox/wt/z*, branches cr2/w1-z*), merged in contract order; Z0 applied every cross-zone request (Gateway refusal, card reader, composeDraft callers and wiring, reminders wiring, visitor drafts wiring, sign-in return path, isSameOriginRequest in every POST route, SIGNUP_OPEN in the e2e environments, the AppPage notice slot, audit words, sample data).docs/decisions.md), and only the failed spec files were rerun: 42 passed, then 19 passed. mobile-360 235 passed, 6 skipped; narrow-320 235 passed, 6 skipped./projects/sandbox/wt/z*, branches cr2/w2-z*), merged in contract order. Z0 applied every cross-zone request and did W2-Z1 (nav, tour, /lab, four new docs pages and CR-02 sections in five more, README).docs/decisions.md). The failed spec files were rerun until green, then each width ran in full: desktop-1440 302 passed (3 skipped), mobile-360 299 passed and narrow-320 299 passed (6 skipped each)./projects/sandbox/wt/*, branches cr2/w3-*): ZL in two worktrees (zl: W3-L1, L2, L6, L8; zl2: W3-L3, L4, L5, L7) with ZA (W3-A7), then ZE (W3-E10, W3-E11), ZG (W3-G7) and ZC (W3-C8). Z0 merged them on cr2/integration, applied every cross-zone request, built W3-Z2, and upgraded Next.js to 16.5 last and alone on cr2/w3-next16 (W3-Z3).docs/decisions.md) and the failed specs rerun green (10 passed). Mobile-360 302 passed and narrow-320 302 passed (6 skipped each).npm audit --omit=dev reports no vulnerability.