Repository navigation
docs(skills): data-hooks teaches the hook and job js-body compile refusal - #35746
objectstack-fleet[bot] wants to merge 2 commits into
Conversation
…usal Claude-Session: https://claude.ai/code/session_01L6bhgTRf6qBRCqPh4JZaZL Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgTRf6qBRCqPh4JZaZL Area b1-D · 2026-11-20T05:11Z · final green head Brief handed to the contract reviewer — PR #35746 @
|
|
repo:objectstack#1 · os-sales · session_01L6bhgTcFanGhTvqS1V2Q4U 维护者速读
席位核对 — ACCEPT (L1-a) · repo:objectstack#1 · head
|
|
repo:objectstack#1 · os-sales · session_01L6bhgTRf6qBRCqPh4JZaZL Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe new bullet (head
No must-fix. S1 (should-fix) — the regex sentence states a condition S2 (should-fix) — eval case 33's second token refuses one of the two repairs the case itself accepts. The six deletions: each is restatement, and no rule lost its only home.
Eval case 33 otherwise asserts what Tried and held: an
Implemented-by: VERDICT: PASS |
…e 33 accepts either repair Claude-Session: https://claude.ai/code/session_01L6bhgTRf6qBRCqPh4JZaZL Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#1 · os-sales · session_01L6bhgTRf6qBRCqPh4JZaZL Superseded by #35757, which folds this pull with the three other area b1-D skills-text pulls (#35743, #35746, #35750, #35751) onto current main at the seat request: one approval and one merge on the governed |
Requested by Sales · project thread
Fixes #35714
Clause-②: no
Metadata-protocol: none
Skills-docs: updated here
维护者速读
What changes
skills/objectstack-data/references/data-hooks.md, section "Sandbox restrictions", gains one bullet after "Rejected byobjectstack build":It names both rule ids, one minimal refused body and its repair, which is the card's Done-when.
skills/objectstack-data/evals/hooks-security-seeds-datasources.jsongains case 33 at the end of the array (no other case touched): the refusedconst ctx = …body underos validate, graded on naminghook-body-does-not-compileand repairing throughctx.input.status.A patch changeset for
@objectstack/skills.Job bodies. No published skill teaches a job
jsbody:git grep -n -i -E "defineJob|jobs?\b"overskills/at 598a34d findsjobs/defineJobonly as a collection name (objectstack-automation/SKILL.md:5,skills/README.md:51,objectstack-platform/SKILL.md:36) andjobas a service token; no file shows a jobbody. So the job sentence lives in this one bullet and no second file is edited.One deliberate difference from the card's wording. The card says the "save door" refuses a hook or job body. Main refuses a job body at the three commands only: no door publishes a job (
packages/spec/src/kernel/metadata-plugin.zod.ts:1040,allowRuntimeCreate: false;packages/lint/src/authoring-rules.ts:2986,runtimeTypes: ['hook']). The skill says exactly that.Token budget (
check-skills-token-ratchet,ceil(utf8 bytes / 4))data-hooks.mdskills/**/*.mdskills/*/SKILL.mdThe bundle token figure is the sum of each file's own
ceil(bytes / 4). Before-readings at 598a34d, after-readings at 03b9383. The eval file is measured by the gate and not ratcheted.The new bullet is +9 lines, +691 bytes. It is paid in the same file, by the standing rule 「A:先削重复,余额按实测提高」 (ruling record 6513306068): six restatements removed, 713 bytes, each with its other home in the file. No remainder is left, so the ceiling row is not touched.
data-hooks.mdbody— Implementation stub under "Key Properties Explained" (a one-sentence pointer)bodycomment, "Thebodyshape" (sourceis the function body), "Error Handling" (a throw aborts)ctx.input/ctx.resultinside the body, which stay partial, see Gotcha 1.)"ctx.inputandctx.resultrows of the sandboxctxtable, and Gotcha 1organization_idcolumn +current_user.organizationId(RLS)"ctx.session.rolesis gone, ctx table above)"ctx.sessionrow of the sandbox table, and theHookContextlisting comment on privilegebefore*for validation andafter*for side effects"Tests
Text only; no behaviour a test pins changed, so no ablation. Every taught fact was read on main (598a34d) and probed.
Facts and where main states them
packages/lint/src/validate-hook-body-compiles.ts:51and:54.(async (ctx) => { SOURCE }):packages/lint/src/action-body-wrapper.ts:52-54(hookBodyFunctionExpression); the rule compiles inside it atvalidate-hook-body-compiles.ts:98(hooks) and:120(jobs); the runtime runs the body in the same expression atpackages/runtime/src/sandbox/quickjs-runner.ts:435.jsbodies only:validate-hook-body-compiles.ts:73-76.packages/lint/src/authoring-rules.ts:2980-2987(tier: 'gating',commands: ALL,surfaces: CLI_AND_RUNTIME,runtimeTypes: ['hook']); pinned bypackages/lint/src/validate-hook-body-compiles.test.ts:137-146(validate, build and lint refuse the hook and the job) and:148-160(the runtime publish door refuses a hook write and admitsconst input = ctx.input || {}).422 INVALID_METADATAat the runtime door:packages/metadata-protocol/src/runtime-authoring-gate.ts:1683-1684.validate-hook-body-compiles.ts:32-34, test:94-95.SyntaxError,line N):validate-hook-body-compiles.ts:105-113,validate-action-body-compiles.ts:190.Probe run on 598a34d (the rule called on one hook and one job per body)
tsxovervalidateHookAndJobBodyCompiles, afterpnpm --filter @objectstack/spec build:Acceptance notes
os lintis named because the rule runs under it (commands: ALL); the neighbouring bullet's older "Rejected byobjectstack build" wording is left as it is, outside this card.Verification
Read first: the new bullet in
skills/objectstack-data/references/data-hooks.md(line 340), then the six deletions in the same file's diff (each is a restatement, check its other home in the table above), then eval case 33.Two-minute check:
node scripts/check-skills-token-ratchet.mjsprints59 authored bundle file(s) within their ceilings, andgit diff origin/main...HEAD -- scripts/is empty (no ceiling moved).Local gates at 03b9383
node scripts/pm/dispatch-gates.mjs --commandsderived 48 families;--ranreconciliation:48 derived, 48 run, 0 UNRUN. 45 exited 0, among them:NOT MEASURED locally (exit 3,
PREREQUISITE NOT MET, each needs built packages this diff does not touch; CI builds them):check:doc-formula-expressions,check:dual-build-cjs-loads,check:lean-entry-closure, andcheck:skill-examples(outside the derivation; the diff adds no checked example block).node scripts/pm/overlap-check.mjs:VERDICT clean exit 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgTRf6qBRCqPh4JZaZL