Repository navigation
RFC: A durable record for evaluations that stop for review, shared by the web app, the CLI and the terminal app #7791
Replies: 6 comments 6 replies
|
Thanks @technomensch, this is careful work, and separating what you saw yourself from what you read in the code makes it much easier to check. The part from your own use is the one to start with: a "Needs review" evaluation losing its explanation after Clear is data loss, whatever we decide about the shared record. If you can open an issue with the exact steps (which surface, what you cleared, what was gone afterwards), it can be fixed on its own while the direction in section 2 gets discussed here. |
|
2.1 gives the hold a |
|
Thanks @renezander030, good catch. An override that disappears from view is the same data loss this RFC started from, so writing the answer into On where it shows: our lean is to keep the resolved hold visible on |
|
Tickets from 14.1 are open (11/30/2026):
A (umbrella) and E onward are not opened yet; they wait on the maintainer answers in section 14.2. Each ticket links back to this RFC and to #7425. |
|
Thanks @technomensch, splitting section 14 into its own tickets makes this much easier to move on. We will pick each one up in its own issue, starting with the lost "Needs review" flag in #8118, since that one is data loss today; the direction in section 2 stays open here. |
|
Adding one more way a run ends at "Needs review", with its prior art: #7507, and PR #7563 (open) for it. In #7507, a hook in the user's AI tool blocks the worker's web fetch. The worker then cannot read the posting and stops before scoring, so the person sees the same "Needs review" screen as for a gate. PR #7563 makes the app read the posting itself first (ATS API, the page's structured data, the page's visible text, then a local browser). When nothing can read it, the person now gets a plain message with options, not a vague stop. How this relates to this RFC:
I'm noting it here, not opening a new ticket. The work stays in #7507 and PR #7563. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Contents
Start here: Where this fits (why this is a Discussion RFC, and which umbrellas it falls under)
About this RFC
I use career-ops for my own job search, and a "Needs review" evaluation lost its explanation when I cleared the workers. I read the code with Claude's help to find out why. This RFC proposes no code yet. I'm asking maintainers to:
What comes from me and what needs checking
Where this fits
Why a Discussion RFC.
web/AGENTS.md:51routes web design and feature proposals to Discussion #156 "so the surface stays coherent", and #156 is also the roadmap that PRs are asked to align with. This proposal changes a web screen, so I'm posting it as an RFC here, as #7425 did. If you'd rather have it under #156, I'll move it. (Updated on 11/25)Umbrellas it falls under
area:web): the class where the web depends on a core definition and nothing enforces it. Its rule is that anything the web copies from the core needs derivation or a CI assertion. This RFC adds a web mirror of a core script (section 2.4) and a list of gate reasons that is already restated in several places, so it is another candidate instance and has to follow that rule. The parity test in section 2.4 is the assertion.dealbreaker,agency_confirmation,needs_confirmation) should become one shared definition, not a list copied per layer (Q7, Q8).Sibling and precedent
Related open work (neighbors, not prior art; both are open PRs that may change)
sync-batch-input.mjsappends throughappendLedgerRows(tracker-utils.mjs:856) so a ledger file with no final newline doesn't merge two rows. The hold file is an appended ledger and should use the same helper. (Updated on 11/25)local:jds/...are silently dropped since #7591 (Apify results never reach pipeline.md / scan-history.tsv) #7740 ): the scan reported rows added that were never written, becausepipeline.mdrefuseslocal:jds/...references at its write boundary ( fix(scan): keep a non-http(s) URL out of the pipeline and scan history #7591 ). Same "silent loss" shape, and it raises a question for the record's key (Q13).1. Problem
An evaluation can legitimately stop before scoring: a dealbreaker, an unnamed staffing agency, a blacklisted company, an unreadable or closed posting. A stop writes no report, no tracker row and no score. The three surfaces then treat the stop differently, and only the web app loses it:
/jobs/<id>page. A server-side log exists, but no screen reads it.- [ ]indata/pipeline.md. Batch runs also record a held status and the question inbatch/batch-state.tsv. An interactive run doesn't save the question.The posting isn't lost. The reason it stopped is. Details are in section 9, and the side-by-side is in section 10.
1.1 A live example (Added on 11/25)
On 2026-11-25 a web evaluation stopped at a dealbreaker: the posting's top pay was below the pay walk-away in my profile. The stop message ended with "Rerun with "evaluate anyway" to get a full evaluation."
The company, link and pay figures are left out because they are my own data.
2. Proposed solution
One change in three stages. Stage 1 is useful on its own.
2.1 Stage 1: record the reason
web/src/app/api/run/route.ts:726-737), a core script writes one record to a dedicated user-layer file. It does not depend on the client's fire-and-forget save.url-key.mjs), reason code, message,confirmationRequired, created date, run id, kind, optional evidence (such as the observed agency), resolution and resolved date (empty at first).2.2 Stage 2: every surface shows the same hold
pipelineandbatchlist open holds at the start of a session.2.3 Stage 3: resolve it
set-status.mjsfor tracker states, the inbox-skip logic for[x], and a fresh single-pass worker for Resume./api/runfield carrying the user's answer, scoped to that posting. The rules already allow this: a prompt carrying the decision resolves the gate (modes/_shared.md:315).2.4 Constraints I'm treating as fixed
web/src/lib/core/behind a parity test (web/AGENTS.mdrules 1-2; theinbox-skipprecedent).<<evaluation-gate>>parser.log_discard()had no callers, and the test called the helper directly, so it passed.appendLedgerRows(tracker-utils.mjs:856), with a test for a file that has no final newline (fix(batch): keep an unterminated batch-input row on its own line #7758).3. Files affected
Proposed. Maintainers, please correct.
inbox-skip.mjs, with a web mirror inweb/src/lib/core/and a parity test.web/src/app/api/run/route.ts(write at the gate decision), a new read route,web/src/components/jobs/job-store.tsx,web/src/components/inbox/inbox-triage.tsx,web/src/app/jobs/[id]/page.tsx.web/is an owner-reviewed path.web/src/app/actions/registry.ts(evaluate,evaluateCompany),web/src/lib/assistant-preamble.mjs,web/src/components/assistant-console.tsx,web/src/lib/inbox-score-target.mjs. (Added on 11/25)batch/batch-runner.sh(write the record atneeds_confirmation,:1934-1973), andmodes/pipeline.md(list open holds). There are 23 localizedmodes/*/pipeline.mdcopies; see Q12.dashboard/internal/data/pending.go, the Inbox screens and README, and the i18n catalog (InboxStatusNeedsAnswerexists in three languages).DATA_CONTRACT.md(one row), andmodes/_files.md(the script and data file list). That list moved there fromAGENTS.mdin refactor(agents): move on-demand reference out of AGENTS.md, cap it at 40k (#6693) #7090, andAGENTS.md:100-102now only points to it. Both files are owner-reviewed. (Updated on 11/25)modes/_shared.md:300-307(owner-reviewed).4. Data Contract impact
USER_PATHS(update-system.mjs:406) already contains.career-ops-web/anddata/. A file in either is preserved by updates and copied by backup (backup.mjsimportsUSER_PATHS). So only aDATA_CONTRACT.mdrow is needed..career-ops-web/is web-managed, andDATA_CONTRACT.md:11-12lists onlychats/andcv-studio/there, not the existingruns/log. The terminal app and CLI would also read this file, which argues fordata/.data/liveness-checks.tsv, a URL-keyed record written by a core script and read by the web, and listed it inDATA_CONTRACT.md(line 45) in the same change. The hold file follows the same shape. (Added on 11/25)5. Phases
These land as separate PRs in dependency order.
RFC #1050 suggests seam-first PRs, and maintainers may prefer a different split. Section 14 lists the recommended tickets. (Updated on 11/25)
6. Open questions for maintainers
Each question is its own heading so tickets can link to it. Tick the box when decided.
Q1. Is the browser-only hold intended?
Is the web app's browser-only hold a gap, or intentional for an alpha?
Q2. Dedicated file or batch state?
Is a dedicated hold record the right owner of this state, or should it extend
batch-state.tsv? I lean toward a dedicated file, since batch state is runner-owned.Q3. Skip for agency holds?
Should a skip be allowed on an agency hold? That changes
modes/_shared.md:300-307, where the only defined exits are resume with an agency, resume as direct, or leave pending.Q4. Web dealbreaker row?
Should the web write the same
SKIP/N/Arow that headless CLI and batch write for a dealbreaker stop?Q5. Blacklist row?
Should "don't evaluate" on a blacklisted posting write a row?
Q6. SKIP or Discarded?
Which tracker state does each resolution write?
SKIPmeans nothing was sent.Discarded"can follow a real application" and still counts as a channel in Check 11 (verify-pipeline.mjs:579-613, verify-pipeline: a SKIP row counts as a submission channel, so correctly resolving a cross-channel collision warns forever #3978/fix(verify-pipeline): stop counting a SKIP row as a submission channe… #4415). ADiscardedrow carrying a Via value would raise a double-submission warning that can't be cleared.SKIPinstead?Q7. Reason vocabulary?
Reuse
templates/discard-reasons.yml(closed list plusother, #2785 / #4549 ), or add a separate hold-reasons list? I grepped that file for dealbreaker, agency and confirmation and found nothing, but didn't read every entry.Q8. Own reason code for closed or unreadable?
Should the closed or unreadable case get its own reason code, instead of sharing the
needs_confirmationcatch-all (evaluation-gate.mjs:7)?Q9. Is Retry in scope?
Retry needs a failure reason code first, and the web has no retry counter. See 14.5.
Q10. What does Dismiss mean?
Is Dismiss the existing inbox Skip (
[x], no tracker row), or something that also records a reason?Q11. TUI resolve keys?
Should the terminal app gain resolve keys in this work?
Q12. Localized pipeline copies?
Do all 23 localized
modes/*/pipeline.mdcopies need the change?Q13. Home and name of the file?
data/or.career-ops-web/? File name and column order? What is the key for a posting that has no http(s) URL, such as alocal:jds/...reference thatpipeline.mdrefuses ( #7748 , #7740 )?Q14. Re-running a gated URL? (Added on 11/25)
Until a resolver exists, what should a re-run of a stopped URL do? Today it differs by path: the assistant ignores it as "already evaluated", the inbox lets it run and it stops at the same gate again, and the job page offers nothing (see 9.7). Should all three block with a plain explanation, or allow the run?
Q15. The assistant as a resolver? (Added on 11/25)
Should the assistant be one of the callers of the resolver, and should it be told when one of its actions was ignored? Today it cannot see the result of an action (
assistant-preamble.mjs:18).7. Out of scope
8. Prior art
gatedstate, the "Needs review" screen and the run-log gate section. Closest ancestor. No follow-up for persistence or resolution. (Updated on 11/25)SKIPis not a submission channel;Discarded,rejectedandevaluatedare. Verify pipeline #3979 was the PR that stacked this fix with two unrelated changes. It is closed, and the draft-answers part is open as Adopt: Verify pipeline (from #3979) #7754. It isn't prior art for holds.otherkept out of the stats; predicted reasons and recorded outcomes are separate series.pipeline.go:147-149).pipeline.go:107-114, 342-350) that appendsDISCARD: <id>to Notes with the status change.unreadablebucket and the batch agency-hold fix.reserve-report-num.mjsclaims numbers with exclusive create under the tracker lock (:300-348). No overlap test exists.data/liveness-checks.tsv, a URL-keyed record written by a core script (check-liveness.mjs), read by the web, and listed inDATA_CONTRACT.md(line 45) in the same change. Closest precedent for where the hold file lives and for its contract row (see Q13). I read the commit message and the contract row, notlib/posting-facts.mjs. (Added on 11/25)AGENTS.mdintomodes/_files.md. Not prior art. It is why section 3 namesmodes/_files.md. (Added on 11/25)local:jds/...are silently dropped since #7591 (Apify results never reach pipeline.md / scan-history.tsv) #7740): neighbors, not prior art; see Where this fits.9. Evidence: how each surface behaves today
9.1 What a stop is
dealbreaker,agency_confirmation,needs_confirmation(web/src/lib/evaluation-gate.mjs:7). The last is a catch-all. Its instruction names dealbreaker, agency confirmation, closed posting and unavailable JD (:12).modes/oferta.md) is a further stop. I didn't verify which code the web gives it.<<evaluation-gate>>JSON block. The message is validated at 1-1200 characters.route.ts:726-737(evaluateRunOutcome, thenevaluationOutcomeEvent,report-persist.mjs:36-70). The persist step never runs.job-stream.mjs:32-45validates the event on the client.9.2 Web app
localStoragekeycareer-ops:jobs, newest 40 (job-store.tsx:57, 119).finish()(:212-241) patches the gate in and callsPOST /api/runs/save(:229-234), fire-and-forget and only fordoneorgated..career-ops-web/runs/<job-id>.md(web/src/app/api/runs/save/route.ts:39, 68). It keeps reason,confirmationRequiredand message (:53-59), validated at:33-36. It is keyed by job id; the URL appears only as- input:.web/src,dashboard,modes,lib,batchand root*.mjsfinds one mention of the log: a sentence in the assistant preamble (web/src/lib/assistant-preamble.mjs:13). No screen, route or script parses it.jobs/[id]/page.tsx:21-28renders from the browser list and callsnotFound()otherwise. Its one gate action is "Open assistant to review". The inbox badge comes from the same list (inbox-triage.tsx:158-168,triage-row.tsx:107-110).job-store.tsx:302).:298-301).jobs-persist.mjs:50-61only rewritesrunningjobs to "Interrupted (page reloaded)"./api/runtakeskind, input, cliId, brief, evaluationSections, ats(route.ts:44), andevaluationSectionsis validated against a fixed ID list (evaluation-options.mjs:16-21).- [ ]. It is ticked only after the report and tracker row are saved (report-persist.mjs:345-357).SIGTERMto the worker (route.tscancel handler, ~:765-771).9.3 CLI, interactive
pipeline: aneeds_confirmationitem stays- [ ], reappears in every search, and is listed separately in the summary (modes/pipeline.mdstep 2f). An unreadable posting stays- [ ]withunreadable: {code}(step 2b). Other inaccessible URLs become- [!], whichreconcile-pipeline.mjs:246keeps. The question and reason are not stored.modes/_shared.md:300-307: no write before confirmation. Exits: resume with agency, resume as direct, leave pending._shared.md:309-317: a prompt carrying the decision resolves the gate for the named item.modes/oferta.md: headless writesSKIP/N/A; interactive writes nothing; "evaluate anyway" updates the SKIP row.modes/oferta.md: an explicit yes evaluates; anything else stops with no evaluation, report or CV.AGENTS.md: held as- [!] … JD unavailable, "not completed, expired, or Discarded".9.4 CLI, batch
needs_confirmationplus the question go tobatch-state.tsv(batch-runner.sh:1934-1973). The reservation is released, and the state is protected from rollback (:943).failedis not terminal.MAX_RETRIES=2per offer (:129); at the limit the offer is skipped unless--retry-failedis passed (:2459-2460). Rate limits go topaused_rate_limit.9.5 Terminal app
internal/data/pending.go).needs_confirmationbecomes "Needs answer" (:460-461).loadBatchStatusesreads only the status column (:404-444), never the question.equeues a row throughsync-batch-input.mjsand never runs an evaluation.xskips anduundoes throughinbox-skip.mjs.a/Arank.9.6 Shared pieces
data/pipeline.mdis the shared Pending list. The scanner treats- [ ]rows as queued and never re-adds them (scan.mjs~2667-2700).- [x]row is governed only by the scan-history TTL.recheck_after_dayshas no default, and onlyadded,skipped_expiredandskipped_duprows can be released.N/A,—and-are sentinels (tracker-parse.mjs:63). The TUI treats them as not evaluated and treats0/5as a real score (score_sentinel_test.go).set-status.mjsis the one locked, validated tracker writer.inbox-skip.mjs; the web uses a mirroredweb/src/lib/core/inbox-skip.mjs).9.7 Assistant actions and inbox re-scoring (Added on 11/25)
evaluateandevaluateCompanyactions (web/src/app/actions/registry.ts).evaluateis ignored with the note "already evaluated" when a job for the URL exists and its status is anything buterror(registry.ts:166). A stopped job has statusgated, so it counts. The lookup reads the newest job in the browser's list whose input equals the URL (assistant-console.tsx:602-605).evaluateCompanykeeps only postings whose job is missing orerror, and otherwise answers "Already evaluated every {company} posting." (registry.ts:178-210).assistant-preamble.mjs:18), so it can say it started a run when the request was dropped.registry.tsalso reads arerunflag, but the envelope the assistant is given lists onlyurl,titleandsubtitleforevaluate(assistant-preamble.mjs:23), andStartOptshas no field for an answer (job-store.tsx:40). A re-run would stop at the same gate.inbox-score-target.mjs:12-14). Save and "Score shortlist" add the row to the shortlist and start a new run without looking for an existing job (inbox-triage.tsx:251-254, 410-416). That run would stop again and spend tokens.inbox-triage.tsx:389only blocks rows that are evaluated.10. Where the surfaces disagree
pipeline.md; batch alsobatch-state.tsvSKIP/N/A; interactive nothingMAX_RETRIES=2,--retry-failedSKIPor inbox tickx)A failed run has only free-text errors (
job-stream.mjs:29-31), with no reason code.11. Choices per situation
Draft wording. A score of 0 is never used;
N/Ais the existing sentinel.SKIP,N/A, rule in Notes) · Keep pending12. Method and limits
Mostly read, not run. I read the cited files and threads. I ran no CLI, TUI or test suite. One stopped web run was observed live on 2026-11-25, and I read its run log (not published here). (Updated on 11/25)
Not confirmed (each is a check someone should do before relying on it):
- [!].batch-state.tsvcould carry holds from the web without disturbing the runner's state machine.pipeline.mdcopies are kept in parity by a test.data/liveness-checks.tsv(feat(web): show when each awaiting-decision posting was found, posted, and last checked open #7733). I read the commit message and the contract row, notlib/posting-facts.mjs. (Added on 11/25)13. Process
DATA_CONTRACT.md, so an RFC.CONTRIBUTING.md:20.web/and the owner-reviewed docs go to maintainer review.dashboard/is routed to its area owner.14. Next steps and recommended tickets
This RFC is the decision record. The work is meant for community contributors. Nobody is committed to build it. Each ticket below is a recommended GitHub issue, to be opened once maintainers answer the questions it depends on. Suggested labels come from the project's current label list. Maintainers decide the final labels.
needs-maintainer-decisionis reserved for the maintainer's own calls.Convention notes for whoever opens the tickets
good first issue,first-timers-only) are reserved for first-time contributors. Most tickets here are larger, sohelp wantedfits better. Maintainers decide.CONTRIBUTING.md:20requires an issue first for a feature. Thedashboard/andtests/paths need no issue of their own, but the umbrella links them anyway.14.1 Tickets that can be opened now
No maintainer decision needed.
umbrella,area:web..career-ops-web/runs/log inDATA_CONTRACT.md.DATA_CONTRACT.md:11-12listschats/andcv-studio/but notruns/. True whether or not this RFC is accepted. Labels:📄 docs. → Opened as #8117. (Updated on 11/30/2026)bug,web-alpha,needs-info. → Opened as #8118. (Updated on 11/30/2026)evaluateandevaluateCompanyactions and the inbox "Score shortlist" treat a stopped run inconsistently. The assistant ignores it as "already evaluated", and the inbox re-runs it and it stops again (see 9.7). Independent of the rest of this RFC. The right behavior is Q14. Labels:bug,area:web. (Added on 11/25) → Opened as #8119. (Updated on 11/30/2026)14.2 Maintainer decisions needed before the feature tickets
Tickets E to J are blocked until maintainers answer the matching questions. The umbrella should list these as blockers.
SKIPversusDiscarded: Q3, Q4, Q5, Q6.pipeline.mdcopies: Q12.14.3 Recommended feature tickets
In dependency order.
inbox-skip.mjs/web/src/lib/core/pattern (web/AGENTS.mdrules 1-2).DATA_CONTRACT.mdandmodes/_files.mdrows. (Updated on 11/25)appendLedgerRowsand tests an unterminated file (fix(batch): keep an unterminated batch-input row on its own line #7758).🔧 scripts,area:web,📄 docs.web/src/app/api/run/route.ts:726-737. Must not claim to fix web: clicking the worker pill during a run reloads the page and orphans the evaluation #7564.area:web.batch-runner.sh, near:1934-1973. Keeps the existingbatch-state.tsvrow.🔧 scripts.pipelineandbatch.modes/pipeline.md, and the localized copies if maintainers say so.⚠️ agent-behavior,🌐 i18n.dashboard/internal/data/pending.go, the Inbox screens and README, and the i18n catalog.📊 dashboard,go./api/runanswer field and prompt step ("Resume with answer").set-status.mjs, the inbox-skip logic and a fresh single-pass worker.⚠️ agent-behavior,🔴 core-architecture,needs-maintainer-decision.14.4 Tickets that wait on J
area:web.📊 dashboard.modes/_shared.md:300-307. Only if Q3 says yes._shared.mdis owner-reviewed. Labels:⚠️ agent-behavior,🔴 core-architecture,needs-maintainer-decision.14.5 Separate RFC, not a ticket here
14.6 Dependencies to watch
verify-pipeline.mjs:579-613): any resolution that writesDiscardedwith a Via value would raise a double-submission warning that can't be cleared (ticket J, Q6).14.7 Not planned
Scoring changes, a worker that survives a closed connection, a large-run coordinator, new tracker states.
All reactions