Skip to content

docs(skills): the refusal-list teaching names the server its /data facts were read on - #38233

Merged
os-zhuang merged 1 commit into
mainfrom
claude/project-thread-jdz4q8
Nov 28, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
claude/project-thread-jdz4q8

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Fixes #38203

Clause-②: no
Metadata-protocol: none

维护者速读

What changes

  • skills/objectstack-data/references/data-hooks.md, Declared refusals, the reasons-list bullet: the 500-character userMessage cut and the uncut details.refusals are now stated for @objectstack/rest's /data routes (mapDataError, CLIENT_MESSAGE_MAX in packages/types/src/data-error-classification.ts), where they were read. The /actions claim is unchanged.
  • Paid for in the same bullet, no fact dropped: "the throw's top-level params" → "the throw's params", "else its holes are empty" → "else holes are empty", "there" dropped, the second "/data" → "They", "relay the lines as text" → "relay them as text". Token ratchet: 10120 → 10120 (ceiling 10120), no raise.
  • Changeset: .changeset/38203-skills-data-refusal-bound-names-rest.md, @objectstack/skills patch.

What was read (the card's first checkbox)

A /data write served through HttpDispatcher.dispatch() lets a declared hook refusal escape: domains/data.ts callDataWrite rethrows anything that is not an earned answer, and dispatch()'s foot catch answers only a permission denial and a driver NOT NULL refusal, rethrowing the rest. The host's catch-all answers it; the in-repo one is @objectstack/hono's createHonoApp (thrownJson → declaredEnvelopeForThrow, @objectstack/plugin-hono-server). dispatcher-plugin's errorResponseBase does not mount /data.

Measured with two throwaway probes (a real sandboxed hook body throwing a three-reason list, userMessage 622 characters; and the real createHonoApp over a stub dispatcher throwing the same shape):

exit status userMessage details.refusals
@objectstack/rest /data (mapDataError) 409 cut to 500 3 lines, whole
createHonoApp catch-all, the hook's own (unregistered) code 500 INTERNAL_ERROR absent absent
createHonoApp catch-all, a registered code 409 622, not cut 3 lines, whole

So the sentence does not hold for that host; the behaviour gap is #38232's, and this PR only makes the skill name the server its sentence is about.

Local gates at aea04b8

node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --ran FILE: 48 derived, 47 run, 1 NOT-MEASURED, 0 UNRUN; every run family exit 0, among them check-skills-token-ratchet.mjs.

  • NOT MEASURED: check:dual-build-cjs-loads, exit 3 (prerequisite not met: it reads every package's dist/, only part of the closure was built). The diff publishes skills text only.
  • The skills text was written by a sub-agent at the mandated tier; verify-review-tier.mjs on its transcript: PASS (10 turns).

🤖 Generated with Claude Code

https://claude.ai/code/session_01L6bhgUxF9GZTGu1pY3z284

…cts were read on

The Declared refusals bullet said `/data` cuts `userMessage` at 500
characters and answers `details.refusals` uncut. Both facts hold for
`@objectstack/rest`'s `/data` routes; a host serving `/data` another way
can answer differently (tracked separately). The sentence now names the
REST routes. Paid for in the same bullet; the file stays at its token
ceiling (10120).

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L6bhgUxF9GZTGu1pY3z284
@github-actions github-actions Bot added size/s documentation Improvements or additions to documentation tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 28, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: aea04b89893c36122426bdef7c2881d896f46515
Local-runs: none
Scope: skills/objectstack-data/references/data-hooks.md + none
Security-touching: no

PR #38233, card #38203. Inputs read: the card body and its two comments (triage, claim 7236858222), the PR body, the two-file diff, the check-runs on this head, and the cited code on main at 23fa3619. The PR had no comments and no earlier record.

① Derived judgments

  • Public surface: one bullet of one published skill reference, wording only. The diff changes four lines of the "several reasons" bullet under Declared refusals in data-hooks.md and adds one changeset. No schema, no code, no gate, no accept-set moves. Right.
  • The subject of two facts is narrowed, none is added. The 500-character userMessage cut and the uncut details.refusals were stated for /data; they are now stated for @objectstack/rest's /data routes. The /actions half of the second sentence is unchanged. Right: this is the second branch of the card's Expected ("the skill names the server its sentence is about").
  • No fact dropped by the paying cuts. Five trims in the same bullet ("top-level" gone, "its" gone, "there" gone, the second "/data" to "They", "the lines" to "them"). Each is judged in ④; none removes a claim.
  • Gate verdicts on this head, as read. Concluded success: Governed Surface Queue Guard, PR-body guards, Check PR Size, Lint · PM dispatch-gates, Lint · scoped · tooling self-tests, Lint · scoped · query-options erasure, Lint · scoped · slot lookup & corpus, Type Check · debt ledger, Test UI, Dogfood Regression Gate, Auto Label, filter. No check-run had failed.
  • Nine check-runs had no conclusion at my last read: Check Changeset, Lint · docs & code guards, Lint · repo & tooling gates, Lint · CI, release & engine gates, Lint · ESLint, Type Check · consumer gates, Type Check · source gates, Plan Test Core shards (with Build Core behind it), Live E2E UI. The token-ratchet claim (10120 of 10120, no raise) and the changeset check are therefore not confirmed by a check-run in this record; the PR body's local figure is the dev's account and I did not re-run it. The seat reads those conclusions before adopting this record. A red one among them is outside what this record judged.

② Semver level

  • .changeset/38203-skills-data-refusal-bound-names-rest.md declares @objectstack/skills patch. The diff publishes skill prose only, with no behaviour change, so patch is right.
  • Clause-②: no and Metadata-protocol: none stand on both the PR body and the changeset, and they agree with the card's claim. Right: the change takes no capability away from a consumer; it narrows what a sentence asserts to where the code makes it true.
  • The changeset body is not reviewed beyond its level (lane seat's ACCEPT). Read for the seat note only: it names no security particulars.

③ Boundary flags

  • Dev flag, "the throw's top-level params" became "the throw's params": answered in ④ as N1, a nit, accepted as written.
  • Dev flag, the dispatcher path answers differently: answered. It is out of this PR by the card's own Expected and is filed as code card runtime(hono): a /data write refused by a hook with its own declared code answers 500 INTERNAL_ERROR on the Hono host, dropping userMessage and details.refusals #38232 (open, priority:p1, pm:queue), whose third checkbox widens this sentence back once both paths agree. Nothing is owed here.
  • Dev flag, check:dual-build-cjs-loads not measured locally: no bearing on a skills-text diff; the head's own check-runs govern, with the caveat in ①.
  • open_questions: none on the PR or the card.
  • Seat note, security particulars of the Hono path in the PR: none found. The PR body and changeset describe which exit answers a refusal and what status and fields came back; they describe a wrong answer to a legitimate caller, nothing more.
  • SQL push-down: not applicable. No query, no id materialisation, no join in the diff.

④ Design judgment

skills/objectstack-data/references/data-hooks.md, judged against the code it cites on main.

  • "@objectstack/rest's /data routes cut userMessage (a single sentence's too) at 500 characters": true. CLIENT_MESSAGE_MAX is 500 in packages/types/src/data-error-classification.ts; boundedDeclaredUserMessage applies truncateClientMessage to any declared userMessage, list or single sentence, and withDeclaredUserMessage puts it on the body. Every @objectstack/rest exit I traced reaches that wrapper: the direct mapDataError calls in crud-routes.ts, data-action-routes.ts, record-page-routes.ts, recycle-bin-routes.ts and form-routes.ts, and the handleRouteError exits of batch-routes.ts through resolveErrorResponse, whose passthrough arms call the same wrapper. I found no /data exit in that package that answers a declared refusal another way.
  • "so a long list loses its closing line": true. The catalogue (packages/runtime/src/sandbox/hook-refusal-catalogue.ts) joins the reason lines and puts the code's own message last; truncation cuts the tail; the closing line is not on refusals. The docblock of withDeclaredRefusalLines says the same.
  • "They and /actions answer details.refusals uncut … absent for a single reason": true for "They". withDeclaredRefusalLines merges declaredRefusalLines(error) into details with no bound, and the catalogue sets refusals only on the reasons-list path. The /actions half is unchanged text and outside this delta; read, not re-judged.
  • The sentence now claims nothing about the dispatcher path: confirmed. Both facts carry the package name as their subject, and no other sentence in the bullet or the section speaks for another host.
  • "filled from the throw's params (else holes are empty)": still true. The closing line is filled from the address's own params, not from any entry's (hook-refusal-catalogue.ts, the closing composition).

Findings:

No must-fix, no should-fix.

Implemented-by: claude/project-thread-jdz4q8
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA (isolated contract-review sub-agent)

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head aea04b8 · card #38203 · area s2-ai · 2026-11-28T09:37Z

L1 checklist

  • Shape and checks. Every check on the head is green apart from expected skips (28 success, 16 skipped); mergeable clean. The PR is a draft. It changes one bullet of skills/objectstack-data/references/data-hooks.md and adds a changeset. The file stays at its token ceiling (10120 of 10120); the addition is paid for by a cut in the same bullet, and no ratchet row is raised.
  • Contract review at CONTRACT_REVIEW_TIER. Record 7237177831 is a PASS: no must-fix, no should-fix. N1 (the cut "top-level" before params; the preceding "its own params" keeps the contrast) and N2 (the skill is silent on the Hono host until runtime(hono): a /data write refused by a hook with its own declared code answers 500 INTERNAL_ERROR on the Hono host, dropping userMessage and details.refusals #38232 lands) are accepted as written. The record's open check-runs have since all concluded green. Its transcript passes verify-review-tier; the seat adopts the record.
  • What changes for an author. The sentence on the /data refusal bound (userMessage cut at 500, every details.refusals entry) now names @objectstack/rest's /data routes, the server it was read on. It no longer implies the same answer from a host serving /data through the runtime dispatcher, which answers differently today (code card runtime(hono): a /data write refused by a hook with its own declared code answers 500 INTERNAL_ERROR on the Hono host, dropping userMessage and details.refusals #38232).
  • Declarations. Clause-②: no, Metadata-protocol: none, @objectstack/skills patch. Fixes #38203 is right.
  • Governance. skills/** is Tier H, so the maintainer's approval lands it. The skills text was written by an isolated fable sub-agent whose served tier the thread checked before push.

Tier: H. Landing: hand-off to the maintainer follows this record.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Tier H hand-off · 2026-11-28T09:38Z · head aea04b8 · approver os-zhuang

维护者速读

  • 改了什么: 只改数据技能里一句话:钩子拒绝一次保存时,提示截到 500 字、拒绝明细完整返回,这句现在写明说的是 @objectstack/rest 的 /data 路由。
  • 为什么: 核对时发现走运行时分发器的宿主(Hono)对同样的拒绝答法不同,已另开代码卡 runtime(hono): a /data write refused by a hook with its own declared code answers 500 INTERNAL_ERROR on the Hono host, dropping userMessage and details.refusals #38232(p1)去修;修好前技能不能把这句说成对所有宿主都成立。
  • 影响: 只改技能文字,不改产品行为。文件在词元上限,新增的字靠同一条里删字抵掉,没有抬上限。
  • 审核: 契约审核(最高档)PASS(7237177831),无应改项,两个小建议按原样接受。席位 L1 ACCEPT 在本评论前一条。
  • 要你做什么: 需要你批准后才能合并。撤回这一次合并即恢复原样。

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 28, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 28, 2026 09:48
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 28, 2026
Merged via the queue into main with commit 01c238a Nov 28, 2026
50 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-jdz4q8 branch November 28, 2026 10:20
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 28, 2026
Nenzyz pushed a commit to Nenzyz/objectstack that referenced this pull request Dec 1, 2026
…o 1 s before merged_at as the merge's (objectstack-ai#38896)

<!-- claude-projects-attribution: {"github_login":"os-support-ai"} -->
_Requested by **Yibo Wang** · [project
thread](https://claude.ai/code/project/chan_01BVUyyPie8gHwoPM18iABwB?thread=cmsg_01BVUyyPie8gHwoPM18iABwB1hPSUXVWWaX4kvGfBzBT7q)_

Fixes objectstack-ai#38863
Refs objectstack-ai#34178
Clause-②: no
Metadata-protocol: none

## 维护者速读
- 用户无感:每周治理合并审计不再把维护者本人经合并队列落地的改动,误报成席位违规。
-
为治理审计这一车队工具消除误报:合并队列在合并前一秒记下“移出队列”,旧读法把它当成最新的队列事件,读不出是谁把改动放进队列;现在只对队列机器人在合并前一秒之内的那一次移出放行,一秒是十二条误报上全部实测到的间隔。
- 出错只会让审计报告漏报或继续误报,不影响任何合并;可直接撤回本次改动恢复旧读法。
- 要你做的:这是须由维护者批准的治理面改动,批准一次即可。

## What changes

`scripts/pm/check-governed-merges.mjs` only (Tier H: an always-H
instrument).

- New `timelineAsQueued(events, landed, { enqueueEvent, dequeueEvent })`
feeds the enqueue leg of `readLandingClearance`. It keeps the events
strictly before `merged_at`, as before. It also drops the merge's own
terminal `removed_from_merge_queue`, but only when all three hold: it is
the **last** queue event the cut keeps, its actor is
`github-merge-queue[bot]` (`MERGE_QUEUE_BOT`), and it is at most
`MERGE_QUEUE_REMOVAL_WINDOW_MS` before `merged_at`. The guard's
`enqueuerFromTimeline` then reads the actor of the
`added_to_merge_queue` before it. The guard is not edited.
- `MERGE_QUEUE_REMOVAL_WINDOW_MS = 1000`. Its docblock cites the
readings: 0 s on objectstack-ai#33555, objectstack-ai#33632 and objectstack-ai#33616, and 1 s on all twelve BREACH
rows of objectstack-ai#34178 (table below). GitHub stamps whole seconds, so 1 s is the
narrowest window the readings support. No gap over 1 s was measured.
- Unchanged readings: a removal by any other actor, a removal further
out (an ejection the queue made first), and an earlier removal followed
by a re-add (the newest queue event is then the add). If the guard's
event names stop being strings, nothing is dropped and the leg stays
undetermined. It never clears on that path.
- Both callers of the landing half pick this up: the low-risk arm leg
and the `.claude/**` split leg.
- The two docblocks (the `readArmLanding` header and the self-test
fixture comment) now state the measured window instead of "shares the
merge's instant".

## Tests

Self-test pins, under `node scripts/pm/check-governed-merges.mjs
--self-test` (1017 assertions, exit 0 on `062ea49f4`):
- objectstack-ai#33603 battery, 71 → 77:
  - the one-second shape clears on the enqueue leg;
- the equal-instant control still clears, and a fleet-bot enqueue on the
one-second shape does not;
  - a removal 2 s or 60 s out stays undetermined;
  - a removal inside the window by another actor stays undetermined;
- after an earlier ejection, the re-add's enqueuer decides (the objectstack-ai#33355 /
objectstack-ai#33394 shape);
  - the pure reader, including a queue-bot removal that an add follows.
- objectstack-ai#35612 split battery, 35 → 36: the one-second shape on the split leg,
with another actor's removal and the fleet bot as controls.

<details><summary>Ablation (fix committed first; every mutation via
scripts/ablation-replace.mjs, restored to the HEAD blob)</summary>

- Enqueue leg back to the plain cut: red on 3 pins (the one-second
shape, the re-add after an ejection, the split leg's one-second shape).
The controls stay green, as expected, because the old reading was
already undetermined for them.
- Actor binding removed: red on the another-actor pin and on the split
pin. A first attempt was a no-op: the tool refused because the
replacement text already existed elsewhere. It was re-run with a unique
replacement.
- Window widened to 60 s: red on the outside-the-window pin and the
pure-reader pin.
- Last-event binding removed: green at first, which exposed a gap. Added
the pin for a queue-bot removal that an add follows (commit
`062ea49f4`). Re-ablated: red.

</details>

## Re-run on objectstack-ai#34178's rows

Enqueue leg, read on each PR's **live** timeline and `merged_at` through
the real guard, before (strict cut) and after (`timelineAsQueued`):

| PR | queue events (UTC) | gap | before | after |
|---|---|---|---|---|
| objectstack-ai#37072 | add os-zhuang 19:16:14 · rem bot 19:34:41 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#36775 | add os-zhuang 22:00:38 · rem bot 22:21:05 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#36067 | add os-zhuang 17:33:58 · rem bot 18:06:13 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#35673 | add os-zhuang 22:28:18 · rem bot 23:03:52 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#35709 | add os-zhuang 04:52:39 · rem bot 05:21:36 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#33355 | add · rem 09:52:16 · re-add os-zhuang 11:13:10 · rem bot
11:50:11 | 1 s | undetermined | authorized (os-zhuang) |
| objectstack-ai#33577 | add os-zhuang 02:51:26 · rem bot 04:44:21 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#33589 | add os-zhuang 02:50:20 · rem bot 04:44:21 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#33394 | add · rem 21:48:10 · re-add os-zhuang 22:52:01 · rem bot
00:44:32 | 1 s | undetermined | authorized (os-zhuang) |
| objectstack-ai#32841 | add os-zhuang 01:28:50 · rem bot 02:13:54 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#32839 | add os-zhuang 23:39:46 · rem bot 00:33:14 | 1 s |
undetermined | authorized (os-zhuang) |
| objectstack-ai#32313 | add os-zhuang 23:44:14 · rem bot 00:13:08 | 1 s |
undetermined | authorized (os-zhuang) |
| control objectstack-ai#33555 | removal == merged_at | 0 s | authorized (os-zhuang) |
authorized (os-zhuang) |
| control objectstack-ai#33632 | removal == merged_at | 0 s | authorized (os-zhuang) |
authorized (os-zhuang) |
| control objectstack-ai#33616 | enqueued by objectstack-fleet[bot] | 0 s |
unauthorized | unauthorized |

End-to-end sweep, the real CLI on both trees with `--since
2026-11-24T19:30:00Z --repos objectstack --json`. Both runs complete,
228 entries each:
- objectstack-ai#37072 goes from `breach` (stage) on `197e3ff3b` to `cleared` by
enqueue (os-zhuang) on `062ea49f4`.
- One more entry moved, outside the 12: **objectstack-ai#38233**, from `pass` to
`cleared` by enqueue. Its timeline has the same shape: added by
os-zhuang 09:48:54, removed by the bot 10:20:32, merged 10:20:33. It was
listed as a seat landing on a record, but it was the maintainer's
enqueue.
- No other entry changed state.

NOT MEASURED: the end-to-end sweep row for the other eleven PRs. A
window back to 2026-11-10 timed out at 570 s, and a 7-day window already
takes about 8 minutes per tree, so this container's 10-minute foreground
limit cannot fit it. Their enqueue-leg reading is in the table above.
The weekly audit job will read them on its next run.

## Smaller finding: recommendation for the seat to route

Recommendation: **enforce the record template where the record is
written. Do not widen the reader.** This PR changes no recogniser
(`record-recognisers.mjs` is outside the claimed surface).

- Evidence: the template the reviewer is handed already spells both
forms the 8 rows missed (`scripts/pm/record-recognisers.mjs` lines
2555–2559 on `197e3ff3b`): a clean round is written `No must-fix, no
should-fix.`, and the delta record names what it closes as `S1: closed`.
The rows wrote `must-fix 0 · should-fix 0`, `S1 closed.` and `F1
(must-fix on SHA): fixed.`, which are off-template.
- Reason: the audit reads records through the queue guard's own reader,
so the audit and the queue agree on what a record says. Widening the
reader alone would make them disagree. Widening it for both changes what
the queue accepts, a contract we own on both ends (AGENTS.md Prime
Directive objectstack-ai#12: reject off-spec input at authoring, never accept a
dialect). A check when the record is written tells the reviewer at once,
while the record can still be fixed.
- After this PR, those 12 rows clear on the enqueue leg, so the phrasing
gap no longer decides them. It matters only for seat landings, where the
queue already refuses the same phrasing.

## Acceptance notes

- `origin/main` moved one commit past the base (`3c617a28e`,
`packages/spec` and `ui/` only, nothing under `scripts/pm/`). It was not
merged in, because the diff does not overlap it.
- For the live sweep, this container's shallow clone was deepened with
`git fetch --shallow-since=2026-11-02 origin main` (additive).

## Verification

Read first:
1. `timelineAsQueued` and `MERGE_QUEUE_REMOVAL_WINDOW_MS` (the risk
hunk: the three conditions that drop an event).
2. The one-line change in `readLandingClearance`.
3. The `WINDOW` pins in the objectstack-ai#33603 battery.

Two-minute check: run `node scripts/pm/check-governed-merges.mjs
--self-test`. Expected: `✓ check-governed-merges --self-test: 1017
assertions`, exit 0.

<details><summary>Local gates on 062ea49</summary>

- The derived set is `node scripts/pm/dispatch-gates.mjs --commands
--repo objectstack-ai/objectstack`, 63 commands. Reconciled with
`--ran`: `63 derived, 61 run, 2 NOT-MEASURED, 0 UNRUN`.
- NOT MEASURED, both left to CI:
- `pnpm check:i18n-coverage`: exit 3, PREREQUISITE NOT MET (no CLI or
examples build in this worktree).
- `pnpm check:pm-dispatch-gates`: killed by timeout at 200 s and again
at 280 s on the shared box, so it never reached a verdict.
- `node scripts/check-self-test-workflow-commands.mjs` first failed when
its spawn timed out (`spawnSync node ETIMEDOUT`) while the box was
loaded. Re-run alone: exit 0.
- Every other command: exit 0.
- No changeset: `scripts/pm/**` is not published (`skip-changeset`).

</details>

---
_Generated by [Claude
Code](https://claude.ai/code/session_01WGufzfWWgrLkABDvbRjhAk)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

3 participants