Repository navigation
Prove two-account isolation in compiled and browser tests - #44
Conversation
Extend the production gateway check so owner-b cannot import into, enumerate, or save owner-a records, and expired, wrong-audience, and service tokens cannot open a human workspace. Add a browser check that clearing the session cookie hides private records on the open page. Co-authored-by: sykosyber <sykosyber@users.noreply.github.com>
Shared CI database leftover jobs hid Explore example jobs. Session expiry is already covered by tracker 401 journeys and refresh unit tests. Co-authored-by: sykosyber <sykosyber@users.noreply.github.com>
sdcarlson
left a comment
There was a problem hiding this comment.
Reviewed exact abf663f. The one-file delta adds meaningful compiled-gateway checks: owner-b importing the same posting cannot mutate/enumerate owner-a state; foreign save is rejected; expired/wrong-audience/service identities cannot open a human workspace; service readiness remains permitted. No existing assertion is weakened and no runtime source changes. Hosted required checks pass on this head. This review inspected the code and CI evidence; no additional local run is claimed. Please reconcile with current main before merging, preserving #40 failure diagnostics/cleanup, then obtain fresh exact-head review if the head changes. Keep issue4 open for actual independently signed-in staging accounts; these fictional JWT tests do not complete that evidence. Title should describe compiled-gateway tests since no browser test was added.
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> ## Problem and result Closes #47 Closes #48 The cleanup queue that deferred closed PR #26 has landed. Open PR #46 already contains #26, but it cannot merge: it conflicts with current `main` on `README.md`, `app/globals.css`, `integrations/connectors.mjs`, and `package.json`, and it still carries a stale toolchain. This PR reconciles that work onto current `main` (`ad4bb8f`, including #44, #45, and #51). After merge, a signed-in applicant can: - Keep a verified fact ledger and learned style rules that **refuse** unsupported agent claims at the API (nothing invented reaches the review queue). - Review logged drafts in batches; staging is not acceptance and never sends an application. - Set preferences by choosing between real postings, then get a weekly plan that maximises the expected value of the **best single offer** under an attention budget. - Pull public Greenhouse and Lever boards onto existing job identity (read-only, no credentials). - Record outcomes with a **receipt** before a submission counts toward reply rates, including an explicit Track action for a newly accepted Ready job. Ended applications cannot be reopened by import. Who needed this: people using assistants at volume, and anyone whose Live loop currently has no honest terminal/receipt model. What failed before: #26 was closed as deferred-not-rejected; #46 was blocked on conflicts. What they can do afterward: use `/profile`, `/review`, `/preferences`, `/plan`, and `/track` on current `main` without dropping session expiry, dirty-editor navigation, null-URL packet identity, recruiter-facing copy, dual-builder credit, or public-copy generation. Supersedes reopening #26. Do not merge conflicted #46 directly. PR #46 commits can stay until this replacement is accepted. ## Evidence - Prior `3e081b4` blockers remain cleared: Offer-to-Accepted, Held-to-Accepted empty draft, empty `delta:[]` 400, stale outcome 409 with versioned Track caller. - Review 5123899043 merge blockers, fixed on `49ff152` (ponytail list not applied): 1. `POST /api/preferences` no longer persists a client `delta`. Winner and loser job keys are the record; the comparison is recomputed from owned Held posting features. `delta: []` and four repeated `[1e308,…]` payloads return 400 and leave `answered` unchanged. The preferences UI sends only those two keys. 2. `numberIsAboutEmployer` is deleted. Every digit in a non-question is a claim. Mixed-subject sentences and `I read your 2024 post on storage engines.` refuse `validateDraftLog` with `cited: []`. 3. Track GET prep includes Ready jobs. Ready rows expose a receipt field and **Record submission** (`kind: 'submitted'`, `version`, `receipt`) through `app/track/page.tsx`. Playwright covers that caller. Seth independently verified the receipt UI on `179df12` and resolved those threads. Overflow on `179df12` was also resolved as bounded `[-1,1]` components. - Review 5123907359 on superseded `179df12`: nearest-subject still missed `I bring your team 15 years of experience.` and `I offer your company 12 years of experience.` Those sentences reject on `49ff152` (exemption deleted). `91e7e57` adds those two strings as regressions. The parser was not expanded. - GitHub Integration (production) on `91e7e57` failed at `owner-a save` with Wrangler `worker restarted mid-request` (503, process still running). Same tree passes `pnpm test:production` locally. `e5c00b3` retriggers required CI only; #22 stays a separate investigation. - Checks run and result (local, including `e5c00b3` production re-run): `pnpm lint` clean; `pnpm typecheck` clean; `pnpm test` 174/174; `pnpm public-copy:check` current; `pnpm build` succeeded; `pnpm test:api` passed; `pnpm test:calibration` passed; `pnpm test:orchestration` passed; `pnpm test:e2e` 8/8; `pnpm test:production` passed including migrations `0000`–`0004`. - Review re-requested on this head. Do not reopen #26 or merge #46. Do not wait on hosting #3. ## Review - [x] One issue owns this scope; unrelated changes are separate. - [x] Tests exercise the changed behavior, including failure paths. - [x] No credentials, personal applications, or private research are included. - [ ] Agent findings are fixed or answered with evidence. - [ ] A maintainer other than the author will approve. - [x] Public capabilities, integration limits and lead-engineer credit match `docs/public-copy.json`; run `pnpm public-copy:check` and follow `docs/PUBLIC-COPY.md` when these change. ### Landing notes for review - Merged `origin/main` (`ad4bb8f`) and resolved public copy in favor of #45 wording and credit, plus this PR's capabilities. - Kept current `package.json` (Apache-2.0, React 19.2.8, Vinext beta.9, Node 24). Did not restore unused UI-kit deps from #46. - Dirty-nav confirm on `/profile`, `/review`, `/preferences`, `/plan`, `/track`. - Terminal statuses are workspace filters and protected saves; they are not import statuses. Offer can still be accepted as an outcome. - Live suites `tests/api.test.mjs`, `tests/calibration.test.mjs`, and `tests/orchestration.test.mjs` each run on a dedicated freshly migrated D1 in required CI. Standing instruction for agents: #47 and #48 must not be deferred behind hosting #3 or experiment #5. <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-3877d527-b5e4-46d7-8c5f-573418309ece?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-3877d527-b5e4-46d7-8c5f-573418309ece&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: sykosyber <sykosyber@users.noreply.github.com>
Problem and result
Issue 4 requires two independently signed-in accounts, forged/expired/service identities, and session expiry. Hosted staging evidence still depends on issue 3. Local security tests can start now.
This change extends the compiled production gateway check so owner-b cannot import into, enumerate, or save owner-a records, and expired, wrong-audience, and service tokens cannot open a human workspace.
This PR leaves issue 4 open. Redacted staging evidence still needs issue 3 hosting. Session expiry on the open page is already covered by
tests/e2e/tracker-expiry.spec.tsandlib/workspace-refresh.ts.Evidence
pnpm lint,pnpm typecheck,pnpm test(98 passed),pnpm build,pnpm test:production(PASS including import isolation, expired JWT, wrong audience, and service-token readiness-only). Latest hosted CI on327d0a8(merge ofmain, run 34005492415): all 9 required checks passed. Prior green headabf663f(run 34004363566). A cookie-clear browser case was removed after it timed out on leftover jobs in the shared CI database; the remaining six browser journeys passed locally.Review
docs/public-copy.json; runpnpm public-copy:checkand followdocs/PUBLIC-COPY.mdwhen these change.