Repository navigation
Description
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
Filing gate: ② follow-up out of #37364. The source is seat 5's contract review on PR #37396 (record 7181386892, S1) and the seat's scope ruling 7181397348, which asked for this card under #36996. The owning area files it, per the maintainer's standing permission for areas to file their own follow-up cards.
Grading: area:ai · Task · p2 · reach: every answer whose citations the host verifies (row 10c producer and the console's citation list) · evidence: read.
维护者速读
- 做什么:引用核对器目前把「提问人无权看 / 记录不存在」和「数据库故障 / 程序出错」一样处理,都是悄悄丢掉引用。要让调用方能分清这两种情况,故障时可以记录或重试,而不是永久丢失。
- 谁受益:云端产生引用的那一步(第 10 行 c 部分)和运维排障的人。
- 不做会怎样:一次数据库抖动会让这条回答的全部引用永久消失,且没人知道原因。
- 需要你做的:无。
What
verifyRecordCitations(citations, door) in packages/services/service-record-context/src/verify-citations.ts (PR #37396) catches every throw from executeGetRecordContext and drops that tuple's citations. ADR-0160 D9 verifies once, so a loss from an outage is permanent and silent.
- Treat only a refusal (an error carrying an ADR-0112
codethe tool answers with: not found, permission, conflict, bad request) as "not verified". Report any other failure to the host, for example through an optionalonErrorcallback or a result shape that separatesverifiedfromunverifiable. Keep the public result fail-closed: a failed read never verifies a citation, and nothing in the result tells a caller whether a hidden record exists. - Do not reveal a refused record's existence: a refusal and a missing record must still look the same to the host.
- While there, close the review's nits that touch the same module: say in
stripBodyTags's JSDoc that it is not a sanitizer; correct the PR feat(spec,service-record-context): the record citation shape, and the verifier that checks a quote as the asking user (ADR-0160 D9) #37396 Acceptance-note claim that tag-stripping "only makes verification stricter" (adjacent elements join); state which list cap 10c gets (the schema refuses 21, the reader takes the first 20).
Acceptance
- A test with a door that throws a non-coded error shows the citation dropped and the failure reported to the host. A control with a coded refusal shows it dropped and not reported.
- A test pins that a refused read and a missing record give the host the same answer.
Clause-②: nounless the exported signature changes in a way an existing caller sees (it has none outside this package today),Metadata-protocol: none.
Blocked by: PR #37396 on main.
Parent: #36996
Size: S
Dedupe (objectstack, is:issue): verifyRecordCitations 0 · citation outage refusal 0.
Activity
objectstack-fleet commentedon Nov 26, 2026
triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE
Triage: lands in area:ai · domain:server · Task · priority:p2 ·
pm:blocked· size S; rationale: the citation verifier must tell "refused" from "failed", so a failure no longer silently drops a citation. It is a #36996 row that the 10c producer and the console depend on, so p2.Confirmed as filed. It goes to seat 5 (zone ai-36996) when its blocker lands.
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
Unblocked: PR #37396 merged at
db46566f5d;verify-citations.tsis onmain.pm:blocked→pm:queue.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
Claim: PM loop round 6 · area ai-36996 (topic #36996 non-cloud rows; the maintainer, verbatim, 2026-11-25T12:57Z project thread: 「开一个 36996 专题,接手剩余任务」; concurrency per area 3, 2026-11-25T23:33Z) · 2026-11-26T04:50Z
Session:
session_01Utp6CbeF2saT6wUBV4E9ucAccount:
os-billArea: ai-36996
Branch:
claude/issue-37418-citation-refusal-vs-outageWorktree:
objectstack-issue-37418Domain:
domain:serverSeat:
repo:objectstack#5File surface:
packages/services/service-record-context/src/verify-citations.ts,src/__tests__/verify-citations.test.ts,src/index.tsonly if an exported type is added; thestripBodyTagsJSDoc inpackages/spec/src/ai/record-body-anchor.ts(prose only); root.changeset/. Stop on breach and report.Container & model:
S,mode:subagent,model: default — dispatch-gates --tier: "no path-derived mandate",effort: mediumClause-②: no
Metadata-protocol: none
Responsibility:
packages/services/service-record-context(verifyRecordCitationscatches every throw) produces the silent loss | no platform path covers it | every answer whose citations the host verifies, once 10c wires the producerPremise: holds — on
origin/main5d21d431e: PR #37396 merged;verify-citations.tsdrops a tuple's citations on any throw.Serial constraints cleared: Blocked-by PR #37396 merged. Sibling #37361 (PR #37412, rework in flight) owns
record-context-tools.ts,door.ts,sentences.ts,record-context-tools.test.ts: not touched. Sibling #37365 is inui/**: disjoint.Pre-claim deps: #37364 closed
Prior rulings read: seat contract review 7181386892 (S1, N1, N2) and scope ruling 7181397348 on PR #37396
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
Claim: PM loop round 6 · re-claim (mode:thread; supersedes 7182951217) · area ai-36996 (topic #36996 non-cloud rows; the maintainer, verbatim, 2026-11-25T12:57Z project thread: 「开一个 36996 专题,接手剩余任务」; concurrency per area 3, 2026-11-25T23:33Z) · 2026-11-26T04:51Z
Session:
session_01Utp6CbeF2saT6wUBV4E9ucAccount:
os-billArea: ai-36996
Branch:
claude/project-thread-maip9mThread session:
session_01Utp6CZnFSe9yjMwBFr33RkDomain:
domain:serverSeat:
repo:objectstack#5File surface:
packages/services/service-record-context/src/verify-citations.ts,src/__tests__/verify-citations.test.ts,src/index.tsonly if an exported type is added; thestripBodyTagsJSDoc inpackages/spec/src/ai/record-body-anchor.ts(prose only); root.changeset/. Stop on breach and report.Container & model:
S,mode:thread,model: default — dispatch-gates --tier: "no path-derived mandate",effort: mediumClause-②: no
Metadata-protocol: none
Responsibility:
packages/services/service-record-context(verifyRecordCitationscatches every throw) produces the silent loss | no platform path covers it | every answer whose citations the host verifies, once 10c wires the producerPremise: holds — on
origin/main5d21d431e: PR #37396 merged;verify-citations.tsdrops a tuple's citations on any throw.Serial constraints cleared: Blocked-by PR #37396 merged. Sibling #37361 (PR #37412, rework in flight) owns
record-context-tools.ts,door.ts,sentences.ts,record-context-tools.test.ts: not touched. Sibling #37365 is inui/**: disjoint.Pre-claim deps: #37364 closed
Prior rulings read: seat contract review 7181386892 (S1, N1, N2) and scope ruling 7181397348 on PR #37396
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CZnFSe9yjMwBFr33Rk
os-dev-report
{ "issue": 37418, "status": "done", "branch": "claude/project-thread-maip9m", "pr": "https://github.com/objectstack-ai/objectstack/pull/37438", "head": "88f220f0c9", "session": "session_01Utp6CZnFSe9yjMwBFr33Rk", "premise_still_valid": true, "summary": "verifyRecordCitations gains an optional third argument { onError(error, call) }. A throw with a string ADR-0112 code and a declared 4xx status is a refusal: dropped, not reported. Any other throw (no code, driver code without status, 5xx) is a failure: dropped (fail-closed) and reported once per verifying call; a throwing callback is ignored. Callback chosen over a verified/unverifiable result shape: smaller, return type unchanged, nothing failure-related next to caller-visible data. Nits: module doc states the producer's cap (reads first 20; schema refuses 21) and that the tag-removed reading joins adjacent text (not only stricter, pinned by a test); stripBodyTags JSDoc says it is not a sanitizer.", "acceptance": { "uncoded throw dropped and reported; coded refusal dropped and not reported": "pass: tests 'drops the citations of a call that fails without a code...', 'reports a driver code with no status, and a coded 5xx...', control 'drops the citations of a coded 4xx refusal and reports nothing'", "refused read and missing record give the host the same answer": "pass: test 'gives the host the same answer for a refused read and a missing record' (toEqual between the two, plus readable control)", "Clause-2 no, Metadata-protocol none": "pass: optional parameter, unchanged return type, no caller outside the package; both lines in PR body and changeset" }, "tests": "88f220f0: pnpm --filter @objectstack/service-record-context test + typecheck under os-verify-lock: VERDICT command-exit 0, Test Files 3 passed, Tests 120 passed, check:test-typecheck OK. Ablation (one, coded-vs-uncoded split): isRefusal reduced to 'has string code' -> 1 failed | 20 passed in verify-citations.test.ts ('reports a driver code with no status, and a coded 5xx, as failures'); restored -> green. packages/spec change is JSDoc only; spec suite left to CI (Test Core green).", "gates": "local: dispatch-gates --commands 87 families run on 88f220f0, 83 exit 0, 4 exit 3 NOT MEASURED for unbuilt prerequisites (check-plugin-teardown-shape --self-test, lint check:doc-formula-expressions, check:dual-build-cjs-loads, check:lean-entry-closure); --ran 87/87 accounted. CI on 88f220f0: 69 check-runs, 58 success, 11 skipped, 0 failure (incl. Check Changeset, Lint & Repo Gates, all Lint lanes, Test Core 10/10, Test UI 16/16). overlap-check VERDICT clean.", "line_budget": "+187 / -14 over 5 files, under 3000", "files_changed": [".changeset/37418-citation-refusal-vs-failure.md", "packages/services/service-record-context/src/__tests__/verify-citations.test.ts", "packages/services/service-record-context/src/index.ts", "packages/services/service-record-context/src/verify-citations.ts", "packages/spec/src/ai/record-body-anchor.ts"], "readings": "ADR-0112 2026-08-27 amendment (status channel is the refusal/fault discriminator); claim 7182951217 + amendment 7182973002; dispatch-37418.md", "deviations": ["Signature line uses this thread's session per claim amendment 7182973002, not the seat session the order names.", "Reviewer request on the PR left to the seat (order forbids MCP writes); assignee os-bill rode pr_create.", "Local spec test suite not run (JSDoc-only change); CI Test Core covers it."], "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm", "mcp_calls": "0", "api_writes": "2 — relay pr_create (PR #37438), this os-dev-report comment via post-stamped; plus git push", "open_questions": [], "security_findings": "none", "out_of_scope_findings": ["carrier: #37361 · noted, not filed — record-context-tools.ts converts some door failures (child served-definition read) into PERMISSION_DENIED 403 for its naming bound, so those reach the verifier as refusals and are not reported; fenced file, untouched"] }Generated by Claude Code
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
Claim amendment · 2026-11-26T05:44Z · claim 7182973002 · seat ruling on PR #37438 before L2.
Clause-②: yes (widening). The optionalonErrorparameter on the exportedverifyRecordCitationswidens the public surface; precedent fix(service-record-context): get_record_context leaves out an unserved related child; both MCP doors supply queryableFieldsOf and their page cap #37412 S1. Bump stays patch.Metadata-protocol: nonestands.objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
ACCEPT → PR #37438 comment 7185121718
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
Merged: PR #37438 at
2776e882f5closed this card byFixes. Delivered:verifyRecordCitationstakes an optionalonError; only a coded refusal with a declared 4xx (.statusthen.statusCode) counts as "not verified", any other failure is dropped and reported; result unchanged and fail-closed; asynconErrorrejections contained;stripBodyTagsJSDoc and module-doc nits. Left: #37463 (executor sites that still turn an outage into 403; nowpm:queue).pm:dispatchedremoved.