Skip to content

37418 跟进:资料包读取把关联对象的故障当作「无权」拒绝,故障应如实报出且不泄露 #37463

Done
1 of 1 issue completed

Description

@objectstack-fleet

repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

Filing gate: ② follow-up out of #37418. The source is seat 5's contract review on PR #37438 (record 7184346569, ③ escalation and N3) and REWORK 7184355118, which ask for this card under #36996 before ACCEPT. 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 get_record_context call on a pack with related (and every citation the host verifies against such a pack) · evidence: read.

维护者速读

  • 做什么:记录资料包读取时,如果关联对象的读取因为故障(比如数据库抖动)失败,现在会被当成「无权访问」整次拒绝。这样核对引用的一方分不清是权限问题还是故障,引用会被悄悄永久丢掉。要让故障以「故障」的形式报出,同时仍然不泄露提问人看不到的对象。
  • 谁受益:AI 回答的引用(云端产生引用那一步)和排障的人。
  • 不做会怎样:故障时整条回答的引用永久丢失,且看起来像权限问题。
  • 需要你做的:无,除非改动需要修改 ADR 文字(受管文件,需要 os-zhuang 批准)。

What

In executeGetRecordContext (packages/services/service-record-context/src/record-context-tools.ts, on main after PR #37412):

  • step 4a: a throwing servedObjectDefinitionOf(child) returns refuseObject(child, false), "A read that failed is no answer about this caller: it refuses, unnamed";
  • step 4a: an assertApiExposed failure that is not an API-exposure refusal (a package gate, an outage) also refuses unnamed;
  • publishedOf: a published-definition read that throws after the gates passed refuses the call unnamed;
  • the child list query, where it fails for a reason that is not a refusal.

Each comes out as PERMISSION_DENIED 403, which the verifier of #37418 (PR #37438) rightly reads as a refusal. So an outage on a pack with related still drops every citation silently and for good.

  1. Tell an outage apart from a refusal at those sites. A failure that is not a coded refusal should surface as a failure, for example a coded 5xx such as SERVICE_UNAVAILABLE per ADR-0112, or by rethrowing the original error. It must still name nothing: no object, field or package name the caller is not shown, and no door rendering of the failure. A package gate that is a real refusal stays 403.
  2. Confirm the verifier end to end: a citation on a pack whose child read throws an uncoded error is dropped and reported through onError, and a coded refusal is dropped and not reported.
  3. If ADR-0160 (D3 "Object level" or point 12, "one object-level code") fixes the 403 for these cases, the ADR sentence needs an amendment (governed docs/adr/**). State the sentence in the PR, and file or ride the amendment.

Acceptance

  • A test per site: an uncoded throw surfaces as a failure that names nothing, with a refusal control that stays PERMISSION_DENIED 403.
  • The real-kernel harness on both doors carries one outage case.
  • The verifier pin of item 2.
  • Clause-②: state the line. The tool's error answer changes for outages, so judge widening or narrowing, and the L2 is owed. Metadata-protocol: none.

Blocked-by: #37438 (the PR, on main)
Parent: #36996
Size: S
Dedupe (objectstack, is:issue): refuses, unnamed outage 0 · record-context PERMISSION_DENIED outage 0.

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    priority:p2
    pm:blocked
    area:ai
    domain:server
    on Nov 26, 2026
  2. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:ai · domain:server · Task · priority:p2 · pm:blocked · size S; rationale: a fault while reading a related object is refused as "no access", so the host cannot tell a fault from a permission refusal and drops the citations. It happens only on a fault, so p2 as filed. The waiting line now reads Blocked-by: #37438 (it said "Blocked by: PR #37438", which the board does not read); no other text changed.

  3. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Unblocked: PR #37438 merged at 2776e882f5; the verifier reports uncoded failures through onError. pm:blocked → pm:queue. Serial note: waits for #37233 (in flight in record-context-tools.ts) before dispatch.

  4. added
    pm:queue
    and removed
    pm:blocked
    on Nov 26, 2026
  5. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Claim: PM loop round 9 · 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-26T11:31Z
    Session: session_01Utp6CbeF2saT6wUBV4E9uc
    Account: os-bill
    Area: ai-36996
    Branch: claude/issue-37463-record-context-outage
    Worktree: objectstack-issue-37463
    Domain: domain:server
    Seat: repo:objectstack#5
    File surface: packages/services/service-record-context/src/record-context-tools.ts (the four sites of the card's What), sentences.ts only if a failure sentence is needed, src/__tests__/record-context-tools.test.ts, src/__tests__/verify-citations.test.ts (the verifier pin); the real-kernel outage case in packages/runtime/src/mcp-record-context-tools-bridge.test.ts; root .changeset/. ⛔ No packages/spec/**, no docs/adr/**: if a spec error code or an ADR sentence must move, stop and report (the ADR text rides #37490). Stop on breach and report.
    Container & model: S, mode:subagent, model: default — dispatch-gates --tier: "no path-derived mandate", effort: medium
    Clause-②: no — the accept set is unchanged; the error answer for an uncoded outage moves from PERMISSION_DENIED 403 to a coded failure, a contract change that owes one contract-review-tier review (L2) before the queue
    Metadata-protocol: none
    Responsibility: packages/services/service-record-context (executeGetRecordContext step 4a, publishedOf, child list query: an uncoded throw refuses unnamed) produces the outage-as-refusal | no platform path covers it | every get_record_context call on a pack with related, and every citation verified against one
    Premise: holds — on origin/main 276174ab0: record-context-tools.ts:427 "A read that failed is no answer about this caller: it refuses, unnamed"; the verifier of #37418 (PR #37438) is on main.
    Serial constraints cleared: #37233 (PR #37484) and #37365 (PR #37485) merged. Sibling #37141 (dispatched now) is in packages/spec/src/ai/skill*, packages/mcp/src/skill-prompts.ts and packages/lint: disjoint. #37432 (same harness) waits until this lands.
    Pre-claim deps: #37418 closed (PR #37438 merged)
    Prior rulings read: contract review 7184346569 and REWORK 7184355118 on PR #37438; ADR-0160 D3 "Object level" and point 12; ADR-0112

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 26, 2026
  7. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
    os-dev-report

    {
     "issue": 37463,
     "status": "done",
     "branch": "claude/issue-37463-record-context-outage",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/37550",
     "head": "32aba545983608ea7b5787ffeb82d95c829267e2",
     "session": "session_01Utp6CbeF2saT6wUBV4E9uc",
     "premise_still_valid": true,
     "summary": "One classifier, isCodedRefusal (ADR-0112: a non-empty string code plus a declared 4xx, .status then .statusCode), now decides refusal vs failure at all four sites through one executor helper (refusedOrFailed): the step 4a assertApiExposed catch, the step 4a servedObjectDefinitionOf catch, publishedOf, and the child list query. A coded refusal answers as before (PERMISSION_DENIED 403 within the naming bound at the three object-level sites; at the child query the door's own coded refusal is rethrown unchanged, as on main). Any other throw now fails the call SERVICE_UNAVAILABLE 503 (an existing ledger code; no spec change). Its own sentence (sentences.ts readFailed, en and zh-Hans) names only the pack and the root, and the original error is on cause. verifyRecordCitations imports the same classifier in place of its private copy, and its docblock paragraph that this change made false is rewritten. Item 3: no ADR-0160 sentence fixes 403 for a failed read. D4 'The naming bound' (\"Every such refusal carries one code — PERMISSION_DENIED, the code #35145 uses — so the code does not tell a hidden object from a refused one.\") and point 12 (\"An object-level refusal names the refused object only when the caller's served schema shows it, and every such refusal carries one code.\") govern refusals only, so no amendment is owed by this PR. Both are quoted in the PR body. ADR untouched.",
     "acceptance": {
      "a test per site, uncoded throw -> failure naming nothing, refusal control stays 403": "PASS: record-context-tools.test.ts new describe, it.each over assertApiExposed / servedObjectDefinitionOf / publishedObjectDefinitionOf / query (503, exact readFailed sentence, no child/field/package/outage text, cause === original); controls: OBJECT_PACKAGE_DISABLED 404 -> PERMISSION_DENIED 403 unnamed at the three object-level sites; child query coded refusal rethrown unchanged; plus driver errno, coded 5xx, status-without-code, thrown string all failures; locale case",
      "real-kernel harness on both doors carries one outage case": "PASS: mcp-record-context-tools-bridge.test.ts, engine.find throws uncoded for rc_revision; /mcp and stdio answer identical bytes, SERVICE_UNAVAILABLE 503, no rc_revision / outage text; control reads after mockRestore",
      "verifier pin (item 2)": "PASS: verify-citations.test.ts, uncoded child served-definition throw -> citation dropped, onError called once with {code SERVICE_UNAVAILABLE, status 503, cause: outage}, message names no child; coded OBJECT_NOT_FOUND 404 there -> dropped, onError not called; control verifies",
      "Clause-② line stated, Metadata-protocol: none": "PASS: 'Clause-②: no' + 'Metadata-protocol: none' line-initial in PR body and in .changeset/37463-record-context-outage.md (patch, @objectstack/service-record-context); L2 contract review owed per claim",
      "ablation on the classifier": "PASS: see tests"
     },
     "files_changed": [
      ".changeset/37463-record-context-outage.md",
      "packages/services/service-record-context/src/record-context-tools.ts",
      "packages/services/service-record-context/src/sentences.ts",
      "packages/services/service-record-context/src/verify-citations.ts",
      "packages/services/service-record-context/src/__tests__/record-context-tools.test.ts",
      "packages/services/service-record-context/src/__tests__/verify-citations.test.ts",
      "packages/runtime/src/mcp-record-context-tools-bridge.test.ts"
     ],
     "line_budget": "n/a: no skills/** or ledger file touched; diff 309 changed lines (+255/-54) across 7 files, under the 3000 human-merge threshold",
     "tests": "At head 32aba54598. `pnpm --filter @objectstack/service-record-context test && typecheck` (locked): Test Files 4 passed (4), Tests 162 passed (162); tsc clean; check:test-typecheck OK; VERDICT command-exit 0. `pnpm --filter @objectstack/runtime test` (whole suite, locked): Test Files 649 passed (649), Tests 12062 passed | 25 skipped; VERDICT command-exit 0. Ablation, classifier: scripts/ablation-replace.mjs replaced `if (err == null || typeof err !== 'object') return false;` in isCodedRefusal with `if (err !== 'ABLATION_37463') return true;` (every throw read as a refusal, which is the pre-change behaviour). Anchor went 1 to 0, blob 74d1834cb467 to 496f2990cf29. Rebuilt; ablation-dist-preflight found the marker in dist/index.js and dist/index.cjs (exit 0). Results: service suites 16 failed / 122 passed: all 9 new outage cases, the new verifier pin, and 6 existing verifier failure cases. Runtime harness 1 failed / 24 passed, the new outage case. Restore leg: blob back to 74d1834cb467, equal to HEAD; git diff HEAD empty; tree clean; rebuilt; preflight --absent exit 0; 138/138 and 25/25 pass. cause safety probe: mapDataError (packages/types, the classifier both MCP doors answer with) on the thrown 503 answers {status 503, code SERVICE_UNAVAILABLE, error 'Internal server error'} identically for cause = none, a plain Error, a SQLite unique violation, a Postgres 23505, SQLITE_BUSY, and a coded 403.",
     "gates": "Local: the 68 families from `dispatch-gates --commands --repo objectstack-ai/objectstack` at 32aba54598, each run with its exit code captured before any pipe. 67 exit 0. 1 NOT MEASURED: `pnpm check:dual-build-cjs-loads` exit 3, PREREQUISITE NOT MET, because it reads every package's dist and only the runtime closure was built here. `--ran` reconciliation: 68 derived, 67 run, 1 NOT-MEASURED (derived from the recorded exit 3), 0 UNRUN. The overlap check before the push gave VERDICT clean (merges cleanly onto origin/main 276174ab0c). CI on PR head 32aba54598, all 53 check-runs completed: 37 success, 16 skipped, 0 failure. Required contexts: Lint & Repo Gates success, TypeScript Type Check success, Test Core success (10/10 shards), Build Core success, Governed Surface Queue Guard success, Dogfood Regression Gate success, Live E2E UI success, Test UI success. Lint UI, Type Check UI and Build & E2E UI were skipped (no ui/ paths). Check Changeset success.",
     "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
     "readings": "Premise checked on origin/main 276174ab0. Sites 1–3 answered an uncoded throw with PERMISSION_DENIED 403 (record-context-tools.ts:419/427/448 on main). Site 4, the child list query, did NOT: it was not caught, so an uncoded throw left the executor raw. At the MCP doors mapDataError then answered 500 INTERNAL_ERROR, and the verifier already reported it through onError. The card's 'each comes out as 403' holds for three of the four sites. ADR-0160 grep found no sentence on failed or failing reads.",
     "deviations": [
      "File surface: verify-citations.ts (src) was edited, though the claim names only its test. This change made its docblock paragraph false ('arrives here as PERMISSION_DENIED 403 ... dropped without a report'), and it now imports the shared classifier in place of its private isRefusal and declaredStatusOf copy. That is the one-helper design the dispatch asked for. Same package, inside the fences.",
      "Child list query, coded refusal: rethrown as the door wrote it (the behaviour on main), not mapped to PERMISSION_DENIED 403. The dispatch says a coded refusal stays 'as today', and today that site never produced 403. The child has passed step 4a (it is served to the caller), so the naming bound holds.",
      "PR body footer: the AGENTS.md session-URL footer and the dispatch's signed trailer were used, and the harness's own attribution block was left out (AGENTS.md takes precedence).",
      "Background waits: one until-loop waiter (task ba25d0yiq) hit its background time limit and was killed; it watched a log that had already finished. The other waiters completed or were stopped. No dev server was started."
     ],
     "mcp_calls": "0",
     "api_writes": "2 — relay (fleet-write repository_dispatch, run 45822180814): pr_create POST /repos/objectstack-ai/objectstack/pulls + assignees os-bill (read back: 7360 bytes sent = stored); post-stamped comment on #37463 (POST /repos/objectstack-ai/objectstack/issues/37463/comments). git push x2 (not REST).",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": []
    }
  8. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Claim amendment · 2026-11-26T13:11Z · claim 7190841367 · records the surface PR #37550 needed (os-dev report 7192952275, deviation 1).

    • File surface, added: packages/services/service-record-context/src/verify-citations.ts (imports the shared isCodedRefusal classifier in place of its private copy, the one-helper design the dispatch asked for, and rewrites the docblock paragraph this change made false). Same package, inside the fences. Clause-②: no and Metadata-protocol: none stand; the L2 is owed.
  9. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Claim amendment · 2026-11-26T13:25Z · claim 7190841367 (amended 7192997436) · records the surface seat 5's REWORK 7193191377 (S2) needs on PR #37550.

    • File surface, added: packages/services/service-record-context/package.json (one workspace dependency, "@objectstack/types": "workspace:*") and its importer stanza in pnpm-lock.yaml. Why: S2 keeps main's refusals at the child list query (a sandboxed beforeFind plain throw stays 400 HOOK_ABORTED; a code-only PERMISSION_DENIED stays 403), and the executor asks the /data door's own classifier (mapDataError, @objectstack/types) rather than copying it, so there is one reader. @objectstack/core already depends on @objectstack/types: no new package in the closure. Still ⛔ packages/spec/**. Clause-②: no and Metadata-protocol: none stand; the L2 is owed.
  10. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
    os-dev-report

    Rework of PR #37550 (FAIL 7193179486, REWORK 7193191377): M1, S1, N1 and S2 addressed at head bd03a37; CI green.

    {
     "issue": 37463,
     "status": "done",
     "branch": "claude/issue-37463-record-context-outage",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/37550",
     "head": "bd03a37ed869418622699397ed127f0dccdceea6",
     "session": "session_01Utp6CbeF2saT6wUBV4E9uc",
     "rework_of": "FAIL record 7193179486, REWORK 7193191377",
     "summary": "Rework, 3 commits on 32aba545. M1: a failure now answers INTERNAL_ERROR 500, not SERVICE_UNAVAILABLE 503. With a 5xx, SERVICE_UNAVAILABLE is on CAPABILITY_ABSENCE_CODES, which made the doors log the outage once per route at warn without the error; INTERNAL_ERROR is in the error ledger and not on that list, so each door now logs at error on every call. The doors' fault line prints only an error's message and stack, never cause (both the console sink and ObjectLogger), so the failure's stack now ends in 'Caused by:' plus the original's stack. cause is still set for in-process hosts. S2, per the seat ruling: the child list query asks the /data door's own classifier (mapDataError from @objectstack/types, a new dependency per claim amendment 7193352452). A throw the door answers below 500 is rethrown untouched as on main: a sandboxed beforeFind plain throw stays 400 HOOK_ABORTED, a status-less PERMISSION_DENIED stays the door's PERMISSION_DENIED. Only a door-classified fault becomes INTERNAL_ERROR 500. The object-level sites keep isCodedRefusal. S1/N1: the changeset and PR body say what an MCP caller sees ({INTERNAL_ERROR, 500, 'Internal server error'}; the readFailed sentence is in-process only), correct the child query's old answer (the raw throw, which the doors answered 500), and note the new dependency.",
     "acceptance": {
      "M1: an outage logs at error with its cause on every call": "PASS: the harness outage case asks both doors twice and gets four '[5xx] 500 tools/call get_record_context rc_policy' console.error lines, each with meta {status 500, code INTERNAL_ERROR} and a stack containing 'Caused by: Error: OUTAGE'; there is no capability-absence warning. The M1 ablation (code back to SERVICE_UNAVAILABLE) fails exactly there: the warn-line filter got 1 entry where [] was expected.",
      "S1: the changeset and PR body say what the caller sees": "PASS: both state { code: 'INTERNAL_ERROR', status: 500 } with message 'Internal server error' on either door, and that the readFailed sentence is in-process only; N1 is corrected in the changeset",
      "S2: door refusals at the child query stay, pinned": "PASS: unit tests show a sandboxed plain throw (innerMessage) and a status-less PERMISSION_DENIED at the query rejected with the same object (rejects.toBe), with the same throws at an object-level read failing as the control, plus a sandboxed crash (native error name) failing. In the harness on both doors, the sandboxed throw answers HOOK_ABORTED 400 in the hook's words and the status-less PERMISSION_DENIED answers PERMISSION_DENIED with no 5xx status; each has a control. The S2 ablation (predicate back to isCodedRefusal) fails all four.",
      "per-site failure tests + refusal controls, verifier pin, harness outage case (round 1 bullets)": "PASS, retargeted to INTERNAL_ERROR 500",
      "Clause-② / Metadata-protocol": "unchanged: 'Clause-②: no', 'Metadata-protocol: none' line-initial in the PR body and the changeset (patch)"
     },
     "gates": "Local: `dispatch-gates --commands --repo objectstack-ai/objectstack` derived 83 families from the diff at bd03a37ed8 (the package.json and lockfile edits added families), each run with its exit code captured before any pipe. 82 exited 0. 1 is NOT MEASURED: check:dual-build-cjs-loads, exit 3, PREREQUISITE NOT MET (it needs every package's dist). check:type-check-debt first exited 3 on a lock queue-timeout (no slot set) and was rerun with OS_VERIFY_LOCK_SLOT: exit 0, 0 entries re-measured above their record. `--ran` reconciliation: 83 derived, 82 run, 1 NOT-MEASURED, 0 UNRUN. The overlap check before both pushes gave VERDICT clean (origin/main, #37442 on pnpm-lock.yaml, #35129 on package.json, all merge cleanly). CI on bd03a37ed8: 69 check-runs, 60 success, 9 skipped, 0 failure. Required contexts are all success: Lint & Repo Gates, TypeScript Type Check, Test Core, Build Core, Governed Surface Queue Guard, Dogfood Regression Gate, Lint UI, Type Check UI, Test UI, Build & E2E UI, Live E2E UI. Check Changeset success.",
     "deviations": [
      "M1 is fixed in-surface by carrying the cause on the failure's stack ('Caused by:' plus the original's stack), not by changing the fault log. A stack never reaches the wire: the harness asserts no outage text on either door's answer. Teaching logServerFault and ObjectLogger to print `cause` would be the platform-wide fix; it lives in packages/types and packages/core, outside the claim, and is listed under out_of_scope_findings.",
      "S2 is applied at the child list query only, as the seat's S2 is worded. The three object-level sites keep isCodedRefusal, so a status-less PERMISSION_DENIED there is a failure (500), as in round 1.",
      "The PR body was rewritten through the relay's issue_patch, as the coordinator ordered. The signed trailer is still the last non-empty line, and the read-back is byte-identical.",
      "check:type-check-debt's first run timed out on the lock queue because the gate-runner script set no slot. It was rerun with a slot and is green."
     ],
     "mcp_calls": "0",
     "api_writes": "Rework round: 2, both through the fleet-write relay. (1) issue_patch on PR #37550's body: PATCH /repos/objectstack-ai/objectstack/issues/37550, run 45840810569, 10060 bytes sent = stored. (2) post-stamped os-dev-report rework comment on #37463: POST /repos/objectstack-ai/objectstack/issues/37463/comments. Plus 2 git pushes (53e65504ed, bd03a37ed8), which are not REST writes. Round 1's 2 writes are unchanged.",
     "open_questions": [],
     "out_of_scope_findings": [
      "class: a · reach: public door /mcp tools/call (and the stdio MCP door), measured in packages/runtime/src/mcp-record-context-tools-bridge.test.ts at c8f14ddd91 (before the stack suffix): a 5xx thrown with the original on `cause` printed a fault line whose meta carried only the wrapper's stack, so the cause was absent ('expected undefined to contain' the outage) · evidence: packages/types/src/server-fault-log.ts logServerFault prints console.error(message, {...meta, stack}) and logger.error(message, err, meta); packages/core/src/logger.ts write() serializes error as {message, stack}; neither reads Error.cause. Any producer that wraps a driver error on `cause` loses it in the operator's 5xx line · dedupe words: 'logServerFault cause', 'fault log Error.cause', 'ObjectLogger cause dropped'"
     ],
     "security_findings": "none"
    }
  11. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc
    os-dev-report

    Second rework of PR #37550 (REWORK 7195238190, S3): at the child list query a fault the /data door codes is rethrown with its own code and sentence; INTERNAL_ERROR 500 only for an uncoded failure. Head 0076159; CI green.

    {
     "issue": 37463,
     "status": "done",
     "branch": "claude/issue-37463-record-context-outage",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/37550",
     "head": "007615908a5a15466ef2ae3724885d009e8fb213",
     "session": "session_01Utp6CbeF2saT6wUBV4E9uc",
     "premise_still_valid": true,
     "rework_of": "REWORK 7195238190 (S3), delta record 7195224182 PASS",
     "summary": "Second rework, one commit on bd03a37e. S3: the child list query now asks doorAnswersItself, which reads the same /data door classifier (mapDataError from @objectstack/types; no second reader). A throw the door answers with anything of its own is rethrown untouched, with the door's code and sentence: a refusal (any status below 500), and a fault the door codes or words (ERR_DATASOURCE_UNAVAILABLE 503 with its sentence, DATABASE_ERROR, a driver's NOT_IMPLEMENTED 501, a declared 5xx with its sentence or userMessage). Only the door's anonymous answer (500, 'Internal server error', coded INTERNAL_ERROR or not coded, nothing else) is an uncoded failure, which fails the call INTERNAL_ERROR 500 with the original on cause and at the foot of the stack, as before. The three object-level sites are unchanged (isCodedRefusal). The changeset and PR body now say INTERNAL_ERROR (500) applies to an uncoded failure, and list the coded faults the door keeps answering. N3 accepted, no action.",
     "acceptance": {
      "S3: rethrow every door-coded fault at the child query, INTERNAL_ERROR only for an uncoded failure, same classifier": "PASS: doorAnswersItself (record-context-tools.ts) asks mapDataError only. Unit: five coded faults at the query (ERR_DATASOURCE_UNAVAILABLE 503, DATABASE_ERROR from a SQLITE_BUSY driver error, NOT_IMPLEMENTED 501, a declared 503 with refusal: true, a declared 503 with userMessage) each first assert the door's own answer for the throw, then rejects.toBe(the same object). Controls at the same site: a status-less 500, a coded INTERNAL_ERROR 500, an errno the door does not recognise (ECONNREFUSED) and a thrown string, which the door answers 500 'Internal server error' and nothing else, fail the call INTERNAL_ERROR with cause and the 'Caused by:' stack.",
      "S3: pin ERR_DATASOURCE_UNAVAILABLE 503 at this site on both doors": "PASS: real-kernel harness case, engine.find throws ERR_DATASOURCE_UNAVAILABLE for rc_revision. Both doors answer the same bytes, { code: ERR_DATASOURCE_UNAVAILABLE, status: 503, message: 'The datasource for this object is not available' }. Each door logs one '[5xx] 503' line, and no logged meta carries INTERNAL_ERROR. A control reads once the spy is removed.",
      "S3: changeset sentence says 500 applies to an uncoded failure": "PASS: the changeset says 'INTERNAL_ERROR (500) applies there to an uncoded failure only' and lists the coded faults the door keeps answering. The PR body's table, bullets and quick-read line were updated to match.",
      "S3: one ablation on the new arm": "PASS: the predicate was reverted to the round-2 rule (the door answers below 500). Unit: 5 failed / 145 passed, the five coded-fault cases. Harness: 1 failed / 27 passed, the ERR_DATASOURCE_UNAVAILABLE case (it answered INTERNAL_ERROR). Restore leg: all green.",
      "M1, S1, S2, N1": "closed per delta record 7195224182. Their tests still pass at the new head: harness 28/28, service 174/174."
     },
     "files_changed_this_round": [
      ".changeset/37463-record-context-outage.md",
      "packages/services/service-record-context/src/record-context-tools.ts",
      "packages/services/service-record-context/src/verify-citations.ts",
      "packages/services/service-record-context/src/__tests__/record-context-tools.test.ts",
      "packages/runtime/src/mcp-record-context-tools-bridge.test.ts"
     ],
     "tests": "All at head 007615908a. pnpm --filter @objectstack/service-record-context test && typecheck: Test Files 4 passed (4), Tests 174 passed (174); tsc clean; check:test-typecheck OK. pnpm --filter @objectstack/runtime test (whole suite): Test Files 649 passed (649), Tests 12065 passed, 25 skipped; lock VERDICT command-exit 0, held 1132s. Ablation S3 used scripts/ablation-replace.mjs. Anchor '(thrown) => doorAnswersItself(thrown, plan.object),' went from 1 hit to 0, and blob 756d30378a88 became cb3d0801619c. The build ran and ablation-dist-preflight found the marker ABL_S3_37463 (exit 0). Unit: Tests 5 failed / 145 passed (150), all five coded-fault cases. Harness: 1 failed / 27 passed, the ERR_DATASOURCE_UNAVAILABLE case: 'expected { code: INTERNAL_ERROR ... } to match object'. Restore: blob 756d30378a88 equal to HEAD, git diff HEAD empty, rebuilt, preflight --absent exit 0, 150/150 and 28/28 pass. Probe of mapDataError on the built dist: ERR_DATASOURCE_UNAVAILABLE 503 with its sentence; 'SQLITE_BUSY: database is locked' 500 DATABASE_ERROR; NOT_IMPLEMENTED 501; declared 503 with refusal keeps its sentence; with userMessage carries userMessage; status-only 500, coded INTERNAL_ERROR 500, ECONNREFUSED with plain text, a thrown string and a sandbox crash are all 500 'Internal server error' and nothing else.",
     "gates": "Local: dispatch-gates --commands --repo objectstack-ai/objectstack derived 83 families at 007615908a, the same set as round 2. Each was run with its exit code captured before any pipe; the record is in 'command :: exit N' form. 82 exited 0. 1 is NOT MEASURED: check:dual-build-cjs-loads, exit 3, PREREQUISITE NOT MET (it needs every package's dist). --ran reconciliation: 83 derived, 82 run, 1 NOT-MEASURED (derived from the recorded exit 3), 0 UNRUN. The derivation warned STALE TREE: 23 commits behind origin/main, with 7 gate files changed there (lint.yml and six check scripts), so the local runs read the older copies; CI on the PR runs the current ones. overlap-check --branch=HEAD: VERDICT clean exit 0 (origin/main 0f6a1e518f; #37442 shares pnpm-lock.yaml; #35129 shares package.json; all merge cleanly). CI on 007615908a: 69 check-runs, 60 success, 9 skipped, 0 failure. Required contexts are all success: Lint & Repo Gates, TypeScript Type Check, Test Core, Build Core, Governed Surface Queue Guard, Dogfood Regression Gate, Lint UI, Type Check UI, Test UI, Build & E2E UI, Live E2E UI, Check Changeset.",
     "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
     "deviations": [
      "The new predicate doorAnswersItself is exported from record-context-tools.ts (not from the package entry), next to isCodedRefusal. It reads mapDataError only and adds no second classifier. 'Anonymous' means status 500, error 'Internal server error', and a body that carries nothing but error and an optional code INTERNAL_ERROR. So a status-only 503, a declared 5xx with a sentence or userMessage, and a demoted declaredCode all count as the door's own answer and are rethrown.",
      "A coded SERVICE_UNAVAILABLE 503 at the child query is now rethrown as the door reads it. The doors then log it as a declared capability absence (once per route, at warn), which is what main did for that throw. The M1 pin concerns the executor's own failure, which is unaffected.",
      "The local gate run read a tree 23 commits behind origin/main (dispatch-gates STALE TREE warning). The branch was not merged with main this round; the overlap check is clean and CI ran the current gates. The round-2 ablations (M1, S2) were not rerun at this head.",
      "Body patched through the relay's issue_patch. The signed trailer is still the last non-empty line, the read-back is byte-identical (12182 bytes), and the PR is still a draft."
     ],
     "mcp_calls": "0",
     "api_writes": "This round: 2, both through the fleet-write relay. (1) issue_patch of PR #37550's body, PATCH /repos/objectstack-ai/objectstack/issues/37550, run 45853997084; 12182 bytes sent and 12182 stored. (2) The post-stamped os-dev-report rework comment, POST /repos/objectstack-ai/objectstack/issues/37463/comments. There was also 1 git push (bd03a37ed8..007615908a), which is not a REST write.",
     "open_questions": [],
     "security_findings": "none",
     "out_of_scope_findings": [
      "carrier: #37598 · the fault line dropping Error.cause, filed by the seat from round 2. Not re-reported."
     ]
    }
  12. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    ACCEPT → PR #37550 comment 7197085445

  13. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#5 · os-bill · session_01Utp6CbeF2saT6wUBV4E9uc

    Merged: PR #37550 at 3806b2e46a closed this card by Fixes. Delivered: at the reads of a related object (step 4a exposure and served definition, the published definitions) a coded refusal still refuses PERMISSION_DENIED 403 within the naming bound, and any other throw now fails the call INTERNAL_ERROR 500, naming only the pack and the root, with the original on cause; at the child list query the /data door's own classifier (mapDataError) decides, so every refusal and every fault the door codes keeps its own code and sentence, and only the door's anonymous 500 becomes INTERNAL_ERROR. The citation verifier reads the same line: a refusal drops the citation silently, a failure is reported through onError. Both doors pinned in the real-kernel harness. No ADR-0160 amendment was needed (D4 naming bound and point 12 govern refusals only). Left: #37598 (the fault log drops Error.cause; it also removes the stack suffix). pm:dispatched removed.

  14. removed
    pm:dispatched
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:aidomain:serverpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions