Skip to content

Land profile calibration and selection outcomes - #49

Merged
sdcarlson merged 15 commits into
mainfrom
cursor/profile-selection-outcomes-9ece
Sep 6, 2026
Merged

sdcarlson merged 15 commits into
mainfrom
cursor/profile-selection-outcomes-9ece

Conversation

@sykosyber

@sykosyber sykosyber commented Sep 6, 2026 •

Copy link
Copy Markdown
Member

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; Diagnose intermittent 503 in compiled production integration test #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 Feat/profile calibration loop #26 or merge Feat/selection and outcomes #46. Do not wait on hosting Provision sdcarlson-owned Cloudflare hosting and verify the first deployment #3.

Review

  • One issue owns this scope; unrelated changes are separate.

  • Tests exercise the changed behavior, including failure paths.

  • 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.

  • 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 Sharpen recruiter-facing Relay copy and credit both builders #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 Feat/selection and outcomes #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.

Open in Web Open in Cursor 

sykosyber and others added 5 commits September 5, 2026 17:21
An autonomous writer needs somewhere to get its facts and somewhere its
output can be checked without a human reading every letter. This adds both,
and keeps them apart: the fact ledger is objective and gated on human
verification, the style card is subjective and learned from corrections.
A style mistake is recoverable; an unsupported claim sent under the
applicant's name is not.

Facts are proposed by local resume extraction and are unusable until
verified, with an optional expiry for anything that goes stale. Drafts are
logged through a new WebMCP tool at any volume, but every sentence asserting
something checkable must cite a verified fact, and every number must appear
in a cited fact. A draft failing either rule is refused at the API and never
written, so an invented achievement cannot reach a review queue at all.

Review is batched and ordered by risk rather than convenience: an unseen
role cluster reviews at the first draft, then style drift, then low agent
confidence, then a full batch. Sessions group repeated openings so one
decision covers several drafts and turn corrections into style rules, since
a session that changes no rule leaves the next batch identical.

Autonomy is then earned per cluster. Enough near-unchanged reviews graduate
a cluster into staging its own drafts; a correction or expired fact demotes
it. Staging is not acceptance — status and accepted_draft are untouched, so
accepting an exact draft stays a human action, and agents still cannot
submit anything.

Every draft records the profile version that produced it, without which a
bad draft cannot be attributed to a bad agent rather than a stale profile.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The review screen is built to resist becoming a batched approval queue.
Reading twelve letters in sequence is the same work as before, so it leads
with repeated openings grouped into one decision, flags near-identical
drafts, and rolls up the facts leaned on most. Corrections are generalised
into proposed rules and confirmed as "always, or just here?", because most
people cannot describe their own voice but recognise a violation instantly.
Closing with an empty rule basket says plainly that the next batch will
repeat the same habits.

The profile screen keeps extraction and verification visibly separate: a
pasted resume proposes candidates and writes nothing, and each line stays
unusable until verified individually.

Docs state what agents may and may not do, and that citation enforcement
checks a claim against a verified fact rather than checking that the
surrounding wording is true.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Drafting was never the largest lever. Which jobs you apply to is: reply odds
vary by orders of magnitude with fit, while letter quality varies perhaps
twofold. This adds the selection half.

The objective is deliberately not the sum over applications. You accept one
job, so the quantity that matters is the expected value of the best single
offer — an order statistic, computed exactly rather than approximated by
tier heuristics. That one change produces a spread of odds by itself: once a
likely offer is held, further similar roles add almost nothing and a long
shot starts winning the comparison. Selection is greedy on gain per minute
under a stated attention budget, so no reach/match/floor ratio is hardcoded,
and every row carries the reason it earned its place.

Preferences supply the utility term and cannot be asked for directly. People
cannot state trade-off weights in the abstract but choose between two
concrete jobs instantly, so they are elicited by forced choice over real
postings and fitted by pairwise logistic regression. Domain fit is computed
from the person's own verified claims rather than learned as one weight per
role family, because a dozen comparisons cannot determine a dozen weights.
With no answers recorded the model reports no opinion instead of inventing
one.

Outcomes close the loop the state machine previously left open at Live loop.
Terminal states are local records of what happened and are deliberately not
valid import statuses, which leaves the existing import matrix untouched and
means rediscovery can never reopen an ended application — asserted against
the real upsert SQL as well as the TypeScript, since the two must agree.

A submission requires a receipt. A false "submitted" is doubly corrupting:
deduplication would stop you applying to a job you never applied to, and the
response-rate posterior would count a send that never happened. Imported
submissions are kept and shown but arrive unreceipted and are excluded from
the rates. Rates are reported as intervals with their evidence count, and
are descriptive only.

The read plane pulls public Greenhouse and Lever boards onto the existing
jobKey identity. It reads only, needs no credentials and no account, and
every posting arrives Held.

No write-plane adapters are included. Nothing here submits an application;
recording a submission is the applicant reporting what they already did.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The preferences screen shows two real jobs side by side and asks which you
would rather have, because that is a question people can answer accurately
and instantly. It shows the fitted weights as shares of one whole so the
implied trade-offs are visible and arguable, and says plainly that it has no
opinion until told something.

The plan screen presents the week rather than a queue: what to apply to,
what it cost of the budget, and why each row earned its place. It reports
what the same budget would buy under a plain value ranking, so the
portfolio's advantage is shown rather than asserted, and it says when the
value model is still too thin to lean on.

The track screen carries both halves of what happens after sending. Reply
rates are labelled descriptive and shown with their evidence count, live
applications are flagged when they carry no receipt, and each one lists the
exact claims it commits you to defending — which is the citation list, not a
document anyone had to write.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bring closed #26 and open #46 onto 9296d9d without dropping session
expiry, dirty-editor navigation, null-URL packet identity, public-copy
generation, or the frozen toolchain. Agent drafts stay gated on
verified facts; selection maximises the best single offer; outcomes
require a receipt and cannot be reopened by import.

Co-authored-by: sykosyber <sykosyber@users.noreply.github.com>
cursoragent and others added 2 commits September 6, 2026 02:09
…eck.

The new Chromium journey clicked Import research before the signed-in
shell finished rendering, so the JSON field never appeared.

Co-authored-by: sykosyber <sykosyber@users.noreply.github.com>
…ities.

Resolve #49 conflicts against #45 public-copy: preserve dual-builder credit
and recruiter wording, then add fact-ledger, batch review, planning, board
pulls, and receipted outcomes. Regenerate the managed README block. Open a
job from the existing queue for the dirty-navigation Chromium check.

Co-authored-by: sykosyber <sykosyber@users.noreply.github.com>

@sdcarlson sdcarlson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes on exact3e081b4ffb24c207e78537dd5efe9f16491e8cee. This replacement retains all four reviewed PR46 blockers. Independent recheck reran the exact-source function reproductions; outcomes.ts, preferences route and outcomes route are unchanged from46:

  1. lib/outcomes.ts:76-83: Offer-to-Accepted still throws because Offer is treated as terminal.
  2. lib/domain.ts:148-150: Held-to-Accepted with empty draft/blocker still passes ordinary workspace validation, bypassing the outcome path.
  3. app/api/preferences/route.ts:76-80: delta:[] is accepted and stored; fitWeights([[]]) yields five NaN weights.
  4. app/api/outcomes/route.ts:83-129: unconditional outcome/event inserts commit even when the version-checked job update changes zero rows; success is returned. Gate all related writes on the successful version mutation and return409 on conflict.

Additional integration gate: scripts/ci/run-unit.mjs now excludes calibration.test.mjs and orchestration.test.mjs, but package scripts/workflow/run-integration do not execute these suites elsewhere. Run them against dedicated freshly migrated fixtures as part of required CI, rather than excluding the new route coverage entirely. Preserve existing checks and privacy/stale-write assertions.

Please fix these cases with regression evidence, reconcile current main, and run the complete required suite before requesting final review. The documented additive-migration scope does not itself validate endpoint behavior. PR46 should not be merged independently; its commits can be preserved until this corrected replacement is accepted.

Comment thread lib/postings.ts Fixed
Comment thread lib/postings.ts Fixed
CodeQL flagged chained unescaping and a script/style filter that missed
closing tags like </script >. Strip tags first, then decode named and
numeric entities in a single pass so double-encoded sequences stay text.

Co-authored-by: sykosyber <sykosyber@users.noreply.github.com>
Comment thread lib/postings.ts Fixed
cursoragent and others added 2 commits September 6, 2026 02:22
CodeQL js/bad-tag-filter still treated </script\\s*> as incomplete because
browsers also accept end tags like </script\\t\\n bar>. Drop script and style
elements by scanning tag boundaries instead of filtering with a regexp.

Co-authored-by: sykosyber <sykosyber@users.noreply.github.com>
Offer remains terminal for import and editor status, but accepted,
withdrawn, and declined outcomes can still be recorded from it.
Held-to-Accepted is refused in ordinary workspace validation.
Empty comparison vectors are rejected and cannot fit NaN weights.
Outcome and event writes run only after a successful versioned job
update and return 409 on conflict.

Applicant-claim detection no longer treats every digit as a claim:
employer-directed numbers such as "your 2024 post" do not require a
citation. Calibration and orchestration now run in required CI on
dedicated freshly migrated databases.

Co-authored-by: sykosyber <sykosyber@users.noreply.github.com>
@sykosyber
sykosyber marked this pull request as ready for review September 6, 2026 02:48
@sykosyber
sykosyber requested a review from sdcarlson September 6, 2026 02:50
@sykosyber

Copy link
Copy Markdown
Member Author

Ready for re-review @sdcarlson

@sdcarlson sdcarlson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes on exact 8466042. The new CI matrix now executes calibration and orchestration on dedicated fixtures, and the empty-vector/transition cases have substantive fixes. Two exact-source reproductions still block approval:

  1. lib/utility.ts isChoiceDelta validates length and finiteness but does not bound components. isChoiceDelta([1e308,1e308,1e308,1e308,1e308]) returns true; fitWeights with four such choices returns five NaNs. Since each normalized feature lies in [0,1], comparison components must be in [-1,1], or derive the vector server-side from the owned jobs. Reject before persistence and cover repeated large finite vectors.

  2. The new lib/profile.ts numberIsAboutEmployer exemption treats any nearby preceding "your" as proof the applicant quantity belongs to the employer. Both "Your role fits my 12 years of experience." and "For your team, I bring 15 years of experience." return isClaim=false and validateDraftLog({body,cited:[]},[],now) accepts them at high confidence. This newly bypasses the unsupported applicant-claim gate. Keep employer-year handling narrow and preserve applicant quantity validation even when employer language appears in the same sentence; add regressions for both mixed-subject cases.

I am separately checking the optimistic-concurrency outcome fix and all UI callers. This review does not claim those checks complete yet. No live records were used in these exported-function reproductions.

@sdcarlson

Copy link
Copy Markdown
Contributor

Additional verification on 8466042: the outcome concurrency blocker is cleared by an independent actual-route probe using SQLite with a D1-shaped adapter. A competing edit injected after SELECT and before the batch returns 409, preserves the competing row, and writes zero outcomes/events. The no-race case returns 200 with exactly one outcome/event. Offer-to-Accepted now validates, and the production Track record caller supplies job.version. The two remaining findings in review5123882135 still require fixes; this is not approval.

@sdcarlson

Copy link
Copy Markdown
Contributor

One additional user-flow finding confirmed by independent exact-tree search on 8466042: there is no user-accessible submission recording action. app/api/outcomes/route.ts:34-35 excludes Ready jobs from prep; app/track/page.tsx:39-48 offers only later outcomes, and its record call supplies no receipt. No other app/integration caller of /api/outcomes exists. Therefore a newly accepted Ready job cannot follow the page instruction to record a submission with its receipt through the app, and cannot enter the outcome flow. Provide an explicit Ready-job receipt recording action with regression coverage. This records the user's already completed external submission; it should not send applications automatically.

@sykosyber

Copy link
Copy Markdown
Member Author

Independent Extra High reproduction on exact 8466042fbd44305e9d8ec75cab001591fb85fa15. Extra High does not self-approve this PR. Last-push partner review remains @sdcarlson.

All three current blockers still hold. I ran the exported functions from this blob (Node type-stripping, no live records):

  1. lib/utility.ts:97-102 — isChoiceDelta([1e308,1e308,1e308,1e308,1e308]) is true. fitWeights with four copies returns five NaN weights (lib/utility.ts:104-126). app/api/preferences/route.ts:82-93 persists any delta that passes that check.

  2. lib/profile.ts:92-110 — numberIsAboutEmployer treats any nearby preceding your as employer-owned. On this head isClaim("Your role fits my 12 years of experience.") and isClaim("For your team, I bring 15 years of experience.") are both false, and validateDraftLog({body, cited:[]}, [], now) accepts both at high confidence (lib/profile.ts:116-118, 395-425). I have spent 3 years. still rejects. Employer-only your 2024 post stays a non-claim.

  3. No user-accessible submission recording action. GET app/api/outcomes/route.ts:34-36 excludes Ready jobs from prep. Track laterKinds at app/track/page.tsx:39-48 has no submitted; the record click at :210-211 sends {id, version, kind} with no receipt. The only app fetch of /api/outcomes is app/track/page.tsx. validateOutcome at lib/outcomes.ts:87-93 already requires Ready plus a receipt for submitted, so the API can record an already-completed external submission, but Track never offers that action. This records the user's external send; it must not send applications automatically.

Required CI on this head is green and does not clear these blockers. The branch is also behind current main (ad4bb8f, #51). Extra High will not merge or deploy.

cursoragent and others added 2 commits September 6, 2026 03:02
Reject comparison vectors outside [-1, 1] so oversized finite choices
cannot produce NaN weights. Treat applicant quantities as claims even
when employer language appears earlier in the same sentence. List Ready
jobs on Track with an explicit receipted submission action.

Co-authored-by: sykosyber <sykosyber@users.noreply.github.com>
Co-authored-by: sykosyber <sykosyber@users.noreply.github.com>

@sdcarlson sdcarlson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict

This PR lands two issues and five new screens (+6137) before anyone has returned to Relay. The actual loops are smaller. Refuse uncited checkable claims. Record that a Ready draft was sent, with a receipt, and that an ended job stays ended. Pairwise logistic regression, E[max] weekly planning, Greenhouse HTML stripping, cluster graduation, and Levenshtein style rules are not required for that. I am not making those cuts a merge condition. The claimed loop is still false on this head until the three holes below close.

Prior 3e081b4 blockers are cleared on 8466042. Offer-to-Accepted, Held-to-Accepted, empty delta:[], and stale outcome 409 all hold in source. CI is green, including calibration and orchestration. I independently reproduced the three remaining holes on this exact tree. No live records.

Merge blockers

  1. isChoiceDelta accepts any five finite numbers. [1e308,...] is true. fitWeights of four such choices returns five NaNs, and POST /api/preferences stores the client vector. Drop client delta. Recompute it from the two owned job keys. Cover repeated large finite vectors. They must 400 and write nothing.
  2. numberIsAboutEmployer treats any nearby preceding your as proof the quantity is the employer's. Your role fits my 12 years of experience. and For your team, I bring 15 years of experience. are both isClaim=false, so validateDraftLog accepts them with cited:[]. Delete the exemption. Every digit in a non-question is a claim. Cover both mixed-subject sentences.
  3. No user-accessible submission recording. GET /api/outcomes prep excludes Ready. /track only offers later kinds and never sends a receipt. Workspace still cannot record submitted. The empty copy tells the user to record a submission with its receipt. The control does not exist. Add one Ready-job receipt action. Regression must go through that caller. This records a send the user already made. It must not send.

Do not add more NLP, more fitter steps, or more CI jobs. Those three close the advertised loop.

Ponytail (not merge conditions, do not apply here)

lib/scoring.ts:1 — delete: E[max] planner, beta prior, freshness decay, reach/match/floor labels; a Ready queue under a minute budget is enough.
lib/utility.ts:97 — reframe: stop persisting client delta; winner and loser job keys are the record.
lib/profile.ts:92 — delete: numberIsAboutEmployer and the 56-character window.
lib/profile.ts:189 — yagni: cluster graduation, editRatio, sameness pairs, opening groups, proposeRules; citation refusal plus human review is the product.
lib/postings.ts:1 — yagni: Greenhouse/Lever HTML stripper; existing import already adds evidence.
lib/resume.ts:1 — yagni: resume line parser; paste-a-fact is enough until someone uses it.
app/plan/page.tsx:1 — delete: /plan and /preferences until a human is drowning in Held jobs.
app/agent-tools.ts — shrink: relay_log_draft / relay_read_profile / relay_review_status wait until the three blockers above exist.
.github/workflows/ci.yml — shrink: two new required integration jobs are more surface than #47/#48 need once those tests live in unit.

Unblock

Fix the three blockers on this branch. Re-request review on that head. Do not reopen #26 or merge #46. Do not wait on hosting #3. After this lands, split the ponytail list onto a later issue or delete it.

Comment thread lib/utility.ts Resolved
Comment thread lib/profile.ts Resolved
Comment thread app/api/outcomes/route.ts Resolved
Comment thread app/track/page.tsx Resolved
@sykosyber

Copy link
Copy Markdown
Member Author

Seth’s latest REQUEST_CHANGES (5123899043) is on superseded 8466042fbd44305e9d8ec75cab001591fb85fa15, not current head 179df120c55686db0c242f46b849a963717d7407. Extra High does not self-approve. Last-push partner review of 179df12 remains @sdcarlson.

Independent Extra High reproduction on exact 179df12 (Node type-stripping, no live records). The three 8466042 holes Extra High previously confirmed are closed on this blob:

  1. lib/utility.ts:97-104 — isChoiceDelta([1e308,1e308,1e308,1e308,1e308]) is now false. Four such vectors fitWeights to zeros, not NaNs.
  2. lib/profile.ts:97-112 — nearest-subject handling. Your role fits my 12 years of experience. and For your team, I bring 15 years of experience. are now isClaim=true; validateDraftLog({body, cited:[]}, [], now) rejects both. I have spent 3 years. still rejects.
  3. app/api/outcomes/route.ts:34-36 includes Ready in prep. Track Ready rows have a receipt field and Record submission (kind: 'submitted', version, receipt) at app/track/page.tsx:206-239. tests/e2e/track.spec.ts clicks that caller. This records an already completed external send; it does not send applications.

Two items from Seth’s newer Unblock still hold on 179df12 and are not last-push approval:

  • app/api/preferences/route.ts:82-98 still persists the client delta after isChoiceDelta. It does not recompute winner-minus-loser from owned job keys.
  • numberIsAboutEmployer still exists. your 2024 post and I read your 2024 post. still log at high confidence with cited:[].

Green required CI on 179df12 does not authorize Extra High self-approval. Extra High will not merge or deploy.

POST /api/preferences records winner and loser job keys and recomputes
the comparison from owned posting features. Client vectors, including
repeated 1e308 payloads, return 400 and write nothing. Every digit in a
non-question is an applicant claim. Ready jobs still record an already
completed submission with a receipt.

Co-authored-by: sykosyber <sykosyber@users.noreply.github.com>

@sdcarlson sdcarlson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exact-head follow-up on 179df12: the bounded vector fix passes the previous overflow reproduction (oversized input rejected; fitter stays finite). The previous two claim examples are now rejected, but the same unsupported-claim defect remains under ordinary word order: "I bring your team 15 years of experience." and "I offer your company 12 years of experience." both return isClaim=false and validateDraftLog({body,cited:[]},[],now) accepts at high confidence. Reproduced against this exact source. A nearest-pronoun rule does not establish who owns the quantity. Remove the employer-number exemption rather than expanding the parser again; conservative rejection is preferable to silently admitting unsupported applicant experience. Keep this thread open until these regressions also reject. Track receipt UI is under independent verification.

@sykosyber
sykosyber requested a review from sdcarlson September 6, 2026 03:09
@sdcarlson

Copy link
Copy Markdown
Contributor

Verified at179df120c55686db0c242f46b849a963717d7407: receipt UI gap is addressed. Independent actual-GET probe returns owned Ready/version7 and excludes Held; Track now offers a receipt field and Record submission passing id/version/kind/receipt, disabling short receipts and busy requests. Existing version-checked POST is unchanged from the independently race-tested fix. Orchestration covers Ready listing and receipt roundtrip; browser-specific interaction was not re-executed in this bounded review. Resolving the two addressed receipt-control threads. Unsupported-claim finding5123907359 remains open; no approval.

@sdcarlson

Copy link
Copy Markdown
Contributor

Overflow thread reconciliation at179df12: the original requirement allowed bounded normalized components or server derivation. isChoiceDelta now requires exactly five finite components in [-1,1], and the preferences route calls it before persistence. Exact-source repeated1e308 reproduction now rejects and produces finite zero fallback weights; the added selection regression covers this. This satisfies the reported overflow defect, so I am resolving that thread. Server derivation is not an additional merge condition absent a separate concrete defect. The unsupported applicant-claim finding remains blocking.

Reject uncited experience claims even when employer language sits
between the first-person subject and the number.

Co-authored-by: sykosyber <sykosyber@users.noreply.github.com>
@sykosyber

Copy link
Copy Markdown
Member Author

Seth’s REQUEST_CHANGES 5123907359 is on exact 179df120c55686db0c242f46b849a963717d7407. Extra High independently reproduced that blob (Node type-stripping, no live records): I bring your team 15 years of experience. and I offer your company 12 years of experience. are both isClaim=false, and validateDraftLog({body, cited:[]}, [], now) accepts them at high confidence. Extra High does not self-approve.

Current head is now 49ff152a7f4ad8f0c22bd295451adec59d45113f. Extra High independently checked that blob only — this is not last-push approval:

  • numberIsAboutEmployer is gone. isClaim treats any digit in a non-question as a claim (lib/profile.ts:96-98). Both of Seth’s 179df12 sentences, plus I read your 2024 post. and your 2024 post, now reject validateDraftLog with cited:[].
  • POST /api/preferences rejects a client delta (app/api/preferences/route.ts:82-83) and stores difference(vector(winner), vector(loser)) from owned Held postings (:84-100).

Last-push partner review of 49ff152 remains @sdcarlson. Extra High will not merge or deploy.

@sykosyber

Copy link
Copy Markdown
Member Author

Head moved after Extra High’s 49ff152 note. Current last-push is 91e7e5744438b6f0a36af8745f8044a498ae7655. Extra High does not self-approve.

Independent Extra High reproduction on exact 91e7e57 (Node type-stripping, no live records): I bring your team 15 years of experience. and I offer your company 12 years of experience. are isClaim=true and validateDraftLog({body, cited:[]}, [], now) rejects both. tests/profile.test.mjs:105-119 now includes those two strings. isClaim is unchanged from 49ff152 (lib/profile.ts:96-98: any digit in a non-question is a claim).

Seth’s receipt-UI and overflow thread resolutions remain on superseded 179df12 and are not last-push approval of this SHA. Last-push partner review of 91e7e57 remains @sdcarlson. Extra High will not merge or deploy.

The production job on 91e7e57 failed at owner-a save with the known
local-worker restart body. Application suites were already green on
this tree; this commit only requeues required checks.

Co-authored-by: sykosyber <sykosyber@users.noreply.github.com>
@sykosyber

Copy link
Copy Markdown
Member Author

Required CI on current head 91e7e57 is red. Integration (production) job 101419634584 failed owner-a save with the same Wrangler 503 already tracked on #22 (scripts/ci/run-production.mjs:148 via :253, retry-after: 0, process exit/signal null). Artifact SHA-256 fcc24b26795e7f962c26f09164d6bbfb83a1c3816d6bb94d772307a88a52ebe1. Recorded on #22. Extra High does not self-approve. Last-push remains @sdcarlson. Extra High will not merge, deploy, or close #22.

@sykosyber

Copy link
Copy Markdown
Member Author

Head is now empty retrigger e5c00b32fd1ab1a9df3a5edc8941008798ec683a (git diff --stat vs 91e7e57 is empty). Extra High does not self-approve. Last-push partner review of this SHA remains @sdcarlson. The 91e7e57 production 503 stays on #22 and does not close it. Extra High will not merge or deploy.

@sykosyber

Copy link
Copy Markdown
Member Author

Required CI on empty retrigger e5c00b32fd1ab1a9df3a5edc8941008798ec683a is now green, including Integration (production) 101419908096 and aggregator CI 101420070519 (run 34008471651). Extra High independently re-checked this blob: Seth’s two 179df12 sentences still reject validateDraftLog with cited:[], and POST /api/preferences still refuses a client delta (app/api/preferences/route.ts:82-83). Extra High does not self-approve. Last-push remains @sdcarlson. Extra High will not merge, deploy, or close #22.

@sdcarlson sdcarlson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approve exact e5c00b3. All reported correctness blockers are addressed. The employer-number exemption is removed and all four mixed-subject examples reject uncited claims. Preference vectors are now derived from owned jobs, both production callers match, and client vectors are rejected before insertion. Independent actual-route probes confirmed both choice directions and no-write rejection. Earlier independent outcome race probe verified post-read conflict returns409 with zero outcome/event inserts; Offer acceptance, editor transition protection and Ready receipt action are fixed. Required calibration/orchestration suites now run on isolated fixtures.

Validation on this exact head: local full unit suite172passed/2platformskips, targeted profile/selection60passed, TypeScript passed. All11 hosted checks are successful, including API/browser/calibration/orchestration/production and CodeQL. The final six-file delta received independent bounded review with no remaining concrete integration finding. This approval covers this reviewed PR, not production deployment or a claim that intermittent #22 is fixed.

@sdcarlson
sdcarlson merged commit 6096657 into main Sep 6, 2026
11 checks passed
@sdcarlson
sdcarlson deleted the cursor/profile-selection-outcomes-9ece branch September 6, 2026 03:23
sdcarlson pushed a commit that referenced this pull request Sep 6, 2026
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## Problem and result

#56 reopened `feat/selection-and-outcomes` against current `main`. That
branch still contains the already-landed #26/#46/#49 application
(profile, plan, track, migrations) plus two newer Claude commits. GitHub
therefore reports conflicts on every hot file and does not give a clean
“new work” signal.

Unique work after the old #46 head (`0d3a006`):

1. **Relay CLI, phase 1** (`login`, `brief`, `log`, `draft`, `plan`,
`status`, `outcome`) — this PR.
2. **Employer-number citation exemption** — **not** included. Current
`main` already requires a citation for every digit, including `I read
your 2024 post on storage engines.` Seth asked that exemption deleted on
#49; restoring it would reopen the mixed-subject hole.

After this lands, an agent on `pnpm dev` can log drafts through the same
citation gate as the browser API. Exit 3 means fix the input and write
nothing. Exit 4 means retry. The CLI still cannot accept a draft, verify
a fact, close a review, answer a preference pair, or submit an
application. Terminal outcomes need `--yes`. Outcomes send the current
job `version` so stale records 409 instead of writing.

`draft --out` writes only after the citation gate and a successful log.
An existing file is left untouched unless `--force` is passed. HTTP 401
is classified as auth (exit 2) before the body is parsed. Non-JSON error
bodies use `exitFor(status)`: plaintext 400/403/404/409/413 are exit 3.
A malformed 200 stays exit 4.

Do not merge #56. Close it as a conflicted duplicate once this
replacement is the review target.

## Evidence

- On `origin/main` `1b6845b` (#55). Bounded origin drain and #49/#54
behavior are unchanged.
- Seth REQUEST_CHANGES on `6bcdcfd`: native `Response('Forbidden', {
status: 403 })` threw code 4. Fixed on `71ef3ca` by applying `exitFor`
when error-body parse fails.
- Local on `71ef3ca`: `pnpm lint` clean; `pnpm typecheck` clean; `pnpm
test` **243/243**; `pnpm public-copy:check` current. CLI unit tests
17/17 including native plaintext 400/403/404/409/413 and malformed 200.
- Hosted CI on `71ef3ca`: all 12 checks green, including **CI /
Integration (cli)** and required **CI / CI**. Run:
https://github.com/SyberLabs/relay/actions/runs/34015612819
- Security, data migration, and rollback impact: no schema change.
Local-only (`RELAY_URL` must be localhost). Session file is ignored
`private-data/.session` mode 600. Production identity is not supported.

## Review

- [x] One issue owns this scope; unrelated changes are separate. This is
the CLI transport only.
- [x] Tests exercise the changed behavior, including failure paths.
- [x] No credentials, personal applications, or private research are
included.
- [x] Agent findings from `2400761` and `6bcdcfd` are fixed. CodeQL
threads are left for Seth to resolve with his stated rationale; Extra
High does not dismiss them as a security-audit or production-auth
approval.
- [ ] A maintainer other than the author will approve the **latest
push**. Extra High cannot self-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.

Do not restore unused UI-kit deps from #56. Do not wait on hosting #3.
#22 stays a separate Wrangler flake.

<!-- 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>&nbsp;<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>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: sykosyber <sykosyber@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not defer selection, receipts, and terminal outcomes Do not defer verified-fact gating and batch draft review

4 participants