You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lint: hook and job bodies get no compile check — the action-body-does-not-compile rule (#34884) covers script actions only #34987
area:builddomain:devxDomain lane — seat card indexed by label:pm:seatfindingRecorded observation — held, not dispatchable until the findings triage round grades itpriority:p2Medium: important, M3
Filed by triage at the request of repo:objectstack#3 (6960988895, item 1). A follow-up of p1 #34884 (PR #34980).
What happens
PR #34980 adds the gating lint rule action-body-does-not-compile for script action bodies inside the runtime wrapper (async (input, ctx) => { … }).
Hook and job bodies (async (ctx) => …) get no equivalent check. A hook or job body that cannot compile still passes validate, build and verify, and fails only at run time, which is the same failure #34884 fixed for actions.
Done when
The same compile check covers hook and job bodies, using their own wrapper shape.
It is pinned with one uncompilable hook and one uncompilable job.
Grade: p2 · domain:devx (theme: MCP, since agents author hooks through the build door). It extends a p1 fix to the neighbouring body kinds. No user is named as hitting it yet.
Claim: PM loop round 1 (repo:objectstack#1 card thread, follows #35040 in the same thread; area lease b1-A)
Session: session_01L6bhgTggz8AL2bCABoDGis
Thread session: session_01L6bhgTggz8AL2bCABoDGis
Account: os-sales
Branch: claude/project-thread-iswnar (platform exception: this card thread can push only its assigned branch; restarted from origin/main c03a8a3 after PR #35672 merged)
Worktree: objectstack-issue-35040 (reused, reset to c03a8a3)
Domain: domain:devx
Seat: repo:objectstack#1
File surface: packages/lint/src/** (the compile check for hook and job bodies, the wrapper module, rule registration in authoring-rules.ts, rule-explanations.ts, index.ts/runtime.ts exports, a card-named test file), packages/runtime/src/sandbox/quickjs-runner.ts (the hook/job wrapper must be built from the same one function the check compiles, per the ⛔ line in packages/lint/src/action-body-wrapper.ts), packages/spec/src/migrations/entries/semantic/** (one ADR-0087 entry for the narrowing), content/docs/automation/hook-bodies.mdx where it states hook/job bodies are not judged, .changeset/**
Container & model: M, mode:thread, model: default (dispatch-gates --tier: no path-derived mandate; floor sonnet · default opus · ceiling fable; L2 owed at CONTRACT_REVIEW_TIER for the narrowing, isolated reviewer), effort: high
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Responsibility: objectstack: no author-time rule compiles a hook or job body.source in the wrapper the runtime runs it in, (async (ctx) => { SOURCE }) (packages/runtime/src/sandbox/quickjs-runner.ts); action-body-does-not-compile covers script actions only and the hook-body parse check uses the TypeScript parser, which reports no early errors | none: such a body fails only at run time | any author writing an inline hook or job body through the authoring doors, MCP agents included; no named user yet
Thread-read: none
Premise: holds — measured on origin/main c03a8a3 (node 22): for const ctx = ctx.input || {}; return 1; and let x = 1; let x = 2; the TypeScript parse inside async function __body(ctx) reports 0 diagnostics while V8 vm.Script over (async (ctx) => { SOURCE }) refuses with Identifier '…' has already been declared; packages/lint/src/validate-action-body-compiles.ts docblock states hook and job bodies are outside the rule.
Pre-claim lane: packages/lint/src/**, packages/runtime/src/sandbox/**, packages/spec/src/migrations/**; repo:objectstack seat covers every domain, card carries area:build (lease b1-A).
Pre-claim deps: #34884 closed; PR #34980 merged; sibling #35040 merged via PR #35672 at feb9b79 (the card brief ordered this card after it). #35694 (same file, pattern regex errors) is open, untriaged and unclaimed: not folded unless triage grades it before this PR opens (seat instruction), then the five fold gates decide.
Prior rulings read: hook body,job body,does-not-compile,scriptbody → 1 hit; ADR-0077 Decision §3 (a hook body always requires human review; not contradicted: a compile check adds a build error, it lowers no review friction); thread: none; repo: objectstack-ai/objectstack. File-surface grep for ⛔: action-body-wrapper.ts:18 "Never spell the wrapper a second time anywhere" — binds the hook/job wrapper too.
Serial constraints cleared: overlap-check.mjs on a probe commit over seven surface files: origin/main merges cleanly, 0 open PR heads share a file, exit 0.
{
"issue": 34987,
"status": "done",
"branch": "claude/project-thread-iswnar",
"pr": "https://github.com/objectstack-ai/objectstack/pull/35713",
"head_sha": "ed1bf20389b9d8f1d4126e2265ffdf7c55fde1d9",
"session": "session_01L6bhgTggz8AL2bCABoDGis",
"premise_still_valid": true,
"summary": "Hooks and jobs were measured to share one wrapper, (async (ctx) => { SOURCE })(globalThis.__ctx), in quickjs-runner.ts (its only branch is origin.kind !== 'action'). hookBodyFunctionExpression / HOOK_BODY_PARAMETERS now live beside actionBodyFunctionExpression in action-body-wrapper.ts and the runner builds the hook/job wrapper from it, byte-identical to before. The compile-and-classify core was lifted out of validateActionBodyCompiles as judgeBodyCompile (the regexp pattern/token split from PR #35672 reused unchanged, action findings byte-identical). New gating rule validateHookAndJobBodyCompiles adds two NEW rule ids, hook-body-does-not-compile and job-body-does-not-compile: one walk and one registry entry because there is one wrapper, two ids because an id names the body kind. It runs on all three CLI commands and on runtimeTypes ['hook']. A job is allowRuntimeCreate: false and hooks is not an ObjectSchema key, so no job or object door exists. os explain pages for both ids, ADR-0087 semantic entry hook-job-body-does-not-compile-refused, docs updated. First-party exposure: 0.",
"tests": "validate-hook-body-compiles.test.ts 11/11, pinning one uncompilable hook (hook-body-does-not-compile · error · hooks[0].body.source) and one uncompilable job (job-body-does-not-compile · error · jobs[0].body.source), plus door tests (os validate/build/lint, runtime publish gate refused and admitted) and controls. @ ed1bf2038: pnpm --filter @objectstack/lint test → 222/222 files, 9336/9336 tests; lint and runtime typecheck exit 0. @ e1209577f: spec test 861 files / 27494 passed; runtime test 631 files / 11629 passed, 25 skipped. Ablation via ablation-replace.mjs, committed first: anchor 'recordsOf(stack.hooks).forEach' changed to recordsOf(undefined), x1 to x0, blob 7abe508df968 to 8271a15f3259. Result 5 failed / 6 passed of 11, the predicted direction (every hook pin red, the job pin green). Restore proven: blob == HEAD, git diff HEAD empty. The subject resolves via relative src imports, so no dist leg. Public-door probe: os validate on a stack with both bodies exits 1, naming hook \"stamp_owner\" and job \"nightly_close\" with SyntaxError and line 1.",
"gates": "dispatch-gates --repo objectstack-ai/objectstack --commands @ ed1bf2038: 118 commands, every one 'cmd :: exit 0' (log: scratchpad gate-results3.txt). --ran: '118 derived, 118 run, 0 NOT-MEASURED, 0 UNRUN' (a derived zero). The first sweep @ f58a65afe had check:docs-transcript-drift :: exit 1 (rule count 73 to 74), fixed in e1209577f. Local-only check:dev-prereqs :: exit 1: 35 unbuilt ui/ dists, container state, the diff touches no ui/. check:nul-bytes :: exit 0. overlap-check @ ed1bf2038: VERDICT clean exit 0. PR check-runs: in_progress, not awaited.",
"dogfood_battery": "ed1bf20389b9d8f1d4126e2265ffdf7c55fde1d9 · VERDICT command-exit 0 · held the lock 1987s · Test Files 482 passed, 3 skipped (485) · Tests 4093 passed, 68 skipped (4161) · no failure",
"line_budget": "691 changed lines (+626 / -65) over 17 files, under the 3000 human-merge threshold. No skills/** path, so no skill line ratchet applies.",
"files_changed": [
".changeset/34987-hook-job-body-does-not-compile.md",
"content/docs/automation/hook-bodies.mdx",
"content/docs/deployment/cli.mdx",
"content/docs/deployment/validating-metadata.mdx",
"content/docs/getting-started/build-with-claude-code.mdx",
"content/docs/ui/react-pages.mdx",
"packages/lint/src/action-body-wrapper.ts",
"packages/lint/src/authoring-rules.ts",
"packages/lint/src/index.ts",
"packages/lint/src/rule-explanations.ts",
"packages/lint/src/runtime.ts",
"packages/lint/src/validate-action-body-compiles.ts",
"packages/lint/src/validate-hook-body-compiles.test.ts",
"packages/lint/src/validate-hook-body-compiles.ts",
"packages/runtime/src/sandbox/quickjs-runner.ts",
"packages/spec/src/migrations/entries/semantic/18.action-body-does-not-compile-refused.ts",
"packages/spec/src/migrations/entries/semantic/18.hook-job-body-does-not-compile-refused.ts"
],
"first_party_exposure": "0. 33 literal L2 bodies judged across examples/**, apps/**, skills/**, content/docs/** (releases excluded) and packages/qa/**, 0 refused. 22 are built from variables or interpolation, all in dogfood tests, and the dogfood battery is green. 9 hook bodies in compiled artifacts (app-crm 1, app-showcase 8), 0 refused. The showcase's one job carries a handler, not a body. os validate over 4 examples: 0 findings. One docs fence (hook-bodies.mdx, compiled-artifact shape) elides its body with an ellipsis: prose, not metadata.",
"deviations": [
"overlap-check ran before pushes 1 (8329621bb) and 4 (ed1bf2038), not before pushes 2 (f58a65afe) and 3 (e1209577f). A run after the fact at e1209577f was clean.",
"File surface grew beyond the claim: content/docs/deployment/cli.mdx, content/docs/getting-started/build-with-claude-code.mdx and content/docs/ui/react-pages.mdx (a forced 73 to 74 rule-count edit, check:docs-transcript-drift), and content/docs/deployment/validating-metadata.mdx (the same edit plus a door-table row for the new rule).",
"PR body opens with the attribution comment, the Requested-by line and the signature line, as the dispatch ordered, so 'Fixes #34987' is line 4, not line 1.",
"The relay action carries the relay's own discriminator key 'op': 'pr_create' besides title/head/base/body.",
"Commits carry the model-free trailer pair the dispatch named, not the harness reminder's Co-Authored-By line with a model name.",
"A container restart killed the first background gate sweep and dogfood run. Both re-ran in full on the final head ed1bf2038 after the one main merge (238661f47).",
"The validating-metadata.mdx door-table row carries a tracker number (#34987), as its sibling rows do."
],
"relay_writes": "3: pr_create (PR #35713), the os-dev-report comment on the PR, and its copy on card #34987",
"api_writes": "3 relay writes: POST /repos/objectstack-ai/objectstack/pulls (draft, forced), POST /repos/objectstack-ai/objectstack/issues/35713/comments, POST /repos/objectstack-ai/objectstack/issues/34987/comments. Plus 4 git pushes to claude/project-thread-iswnar (not REST).",
"mcp_calls": "0",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [
"carrier: none · noted, not filed. A hook or job body that still fails to compile at run time gets the runner's generic \"hook 'NAME' threw: SyntaxError\" sentence, not the coded actionBodyCompileFailure sentence actions get.",
"carrier: seat (Skills-docs: follow-up owed) · skills/objectstack-data/references/data-hooks.md, section 'Sandbox restrictions', names no compile check."
]
}
Merged · 2026-11-20T03:40Z · PR #35713 merged at 5ecf9374701d3fcb9de439c0bc09f7008992c80a; this card closed through Fixes #34987.
Delivered: hook and job bodies are compiled at author time in the wrapper the runtime runs them in (hookBodyFunctionExpression, now the runner's only spelling), refused at error as hook-body-does-not-compile / job-body-does-not-compile on os validate, os build, os lint and the runtime publish gate for hook writes; the regex pattern/token split from PR #35672 is reused. ADR-0087 semantic entry hook-job-body-does-not-compile-refused added. Left, each awaiting triage and not started: #35714 (skills doc), #35715 (run-time compile failure reports a generic threw sentence), #35720 (review nits N1–N5). pm:dispatched removed.
area:builddomain:devxDomain lane — seat card indexed by label:pm:seatfindingRecorded observation — held, not dispatchable until the findings triage round grades itpriority:p2Medium: important, M3
Activity
objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#1 · os-sales · session_01L6bhgTggz8AL2bCABoDGis
Claim: PM loop round 1 (repo:objectstack#1 card thread, follows #35040 in the same thread; area lease b1-A)
Session:
session_01L6bhgTggz8AL2bCABoDGisThread session:
session_01L6bhgTggz8AL2bCABoDGisAccount:
os-salesBranch:
claude/project-thread-iswnar(platform exception: this card thread can push only its assigned branch; restarted from origin/main c03a8a3 after PR #35672 merged)Worktree:
objectstack-issue-35040(reused, reset to c03a8a3)Domain:
domain:devxSeat:
repo:objectstack#1File surface:
packages/lint/src/**(the compile check for hook and job bodies, the wrapper module, rule registration inauthoring-rules.ts,rule-explanations.ts,index.ts/runtime.tsexports, a card-named test file),packages/runtime/src/sandbox/quickjs-runner.ts(the hook/job wrapper must be built from the same one function the check compiles, per the ⛔ line inpackages/lint/src/action-body-wrapper.ts),packages/spec/src/migrations/entries/semantic/**(one ADR-0087 entry for the narrowing),content/docs/automation/hook-bodies.mdxwhere it states hook/job bodies are not judged,.changeset/**Container & model:
M,mode:thread,model: default (dispatch-gates --tier: no path-derived mandate; floor sonnet · default opus · ceiling fable; L2 owed at CONTRACT_REVIEW_TIER for the narrowing, isolated reviewer),effort: highClause-②: no (narrowing)
Metadata-protocol: narrowed
Responsibility:
objectstack: no author-time rule compiles a hook or job body.source in the wrapper the runtime runs it in, (async (ctx) => { SOURCE }) (packages/runtime/src/sandbox/quickjs-runner.ts); action-body-does-not-compile covers script actions only and the hook-body parse check uses the TypeScript parser, which reports no early errors | none: such a body fails only at run time | any author writing an inline hook or job body through the authoring doors, MCP agents included; no named user yetThread-read: none
Premise: holds — measured on origin/main c03a8a3 (node 22): for
const ctx = ctx.input || {}; return 1;andlet x = 1; let x = 2;the TypeScript parse insideasync function __body(ctx)reports 0 diagnostics while V8vm.Scriptover(async (ctx) => { SOURCE })refuses withIdentifier '…' has already been declared;packages/lint/src/validate-action-body-compiles.tsdocblock states hook and job bodies are outside the rule.Pre-claim lane:
packages/lint/src/**,packages/runtime/src/sandbox/**,packages/spec/src/migrations/**; repo:objectstack seat covers every domain, card carriesarea:build(lease b1-A).Pre-claim deps: #34884 closed; PR #34980 merged; sibling #35040 merged via PR #35672 at feb9b79 (the card brief ordered this card after it). #35694 (same file, pattern regex errors) is open, untriaged and unclaimed: not folded unless triage grades it before this PR opens (seat instruction), then the five fold gates decide.
Prior rulings read: hook body,job body,does-not-compile,scriptbody → 1 hit; ADR-0077 Decision §3 (a hook body always requires human review; not contradicted: a compile check adds a build error, it lowers no review friction); thread: none; repo: objectstack-ai/objectstack. File-surface grep for ⛔:
action-body-wrapper.ts:18"Never spell the wrapper a second time anywhere" — binds the hook/job wrapper too.Serial constraints cleared:
overlap-check.mjson a probe commit over seven surface files: origin/main merges cleanly, 0 open PR heads share a file, exit 0.Generated by Claude Code
objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#1 · os-sales · session_01L6bhgTggz8AL2bCABoDGis
os-dev-report
{ "issue": 34987, "status": "done", "branch": "claude/project-thread-iswnar", "pr": "https://github.com/objectstack-ai/objectstack/pull/35713", "head_sha": "ed1bf20389b9d8f1d4126e2265ffdf7c55fde1d9", "session": "session_01L6bhgTggz8AL2bCABoDGis", "premise_still_valid": true, "summary": "Hooks and jobs were measured to share one wrapper, (async (ctx) => { SOURCE })(globalThis.__ctx), in quickjs-runner.ts (its only branch is origin.kind !== 'action'). hookBodyFunctionExpression / HOOK_BODY_PARAMETERS now live beside actionBodyFunctionExpression in action-body-wrapper.ts and the runner builds the hook/job wrapper from it, byte-identical to before. The compile-and-classify core was lifted out of validateActionBodyCompiles as judgeBodyCompile (the regexp pattern/token split from PR #35672 reused unchanged, action findings byte-identical). New gating rule validateHookAndJobBodyCompiles adds two NEW rule ids, hook-body-does-not-compile and job-body-does-not-compile: one walk and one registry entry because there is one wrapper, two ids because an id names the body kind. It runs on all three CLI commands and on runtimeTypes ['hook']. A job is allowRuntimeCreate: false and hooks is not an ObjectSchema key, so no job or object door exists. os explain pages for both ids, ADR-0087 semantic entry hook-job-body-does-not-compile-refused, docs updated. First-party exposure: 0.", "tests": "validate-hook-body-compiles.test.ts 11/11, pinning one uncompilable hook (hook-body-does-not-compile · error · hooks[0].body.source) and one uncompilable job (job-body-does-not-compile · error · jobs[0].body.source), plus door tests (os validate/build/lint, runtime publish gate refused and admitted) and controls. @ ed1bf2038: pnpm --filter @objectstack/lint test → 222/222 files, 9336/9336 tests; lint and runtime typecheck exit 0. @ e1209577f: spec test 861 files / 27494 passed; runtime test 631 files / 11629 passed, 25 skipped. Ablation via ablation-replace.mjs, committed first: anchor 'recordsOf(stack.hooks).forEach' changed to recordsOf(undefined), x1 to x0, blob 7abe508df968 to 8271a15f3259. Result 5 failed / 6 passed of 11, the predicted direction (every hook pin red, the job pin green). Restore proven: blob == HEAD, git diff HEAD empty. The subject resolves via relative src imports, so no dist leg. Public-door probe: os validate on a stack with both bodies exits 1, naming hook \"stamp_owner\" and job \"nightly_close\" with SyntaxError and line 1.", "gates": "dispatch-gates --repo objectstack-ai/objectstack --commands @ ed1bf2038: 118 commands, every one 'cmd :: exit 0' (log: scratchpad gate-results3.txt). --ran: '118 derived, 118 run, 0 NOT-MEASURED, 0 UNRUN' (a derived zero). The first sweep @ f58a65afe had check:docs-transcript-drift :: exit 1 (rule count 73 to 74), fixed in e1209577f. Local-only check:dev-prereqs :: exit 1: 35 unbuilt ui/ dists, container state, the diff touches no ui/. check:nul-bytes :: exit 0. overlap-check @ ed1bf2038: VERDICT clean exit 0. PR check-runs: in_progress, not awaited.", "dogfood_battery": "ed1bf20389b9d8f1d4126e2265ffdf7c55fde1d9 · VERDICT command-exit 0 · held the lock 1987s · Test Files 482 passed, 3 skipped (485) · Tests 4093 passed, 68 skipped (4161) · no failure", "line_budget": "691 changed lines (+626 / -65) over 17 files, under the 3000 human-merge threshold. No skills/** path, so no skill line ratchet applies.", "files_changed": [ ".changeset/34987-hook-job-body-does-not-compile.md", "content/docs/automation/hook-bodies.mdx", "content/docs/deployment/cli.mdx", "content/docs/deployment/validating-metadata.mdx", "content/docs/getting-started/build-with-claude-code.mdx", "content/docs/ui/react-pages.mdx", "packages/lint/src/action-body-wrapper.ts", "packages/lint/src/authoring-rules.ts", "packages/lint/src/index.ts", "packages/lint/src/rule-explanations.ts", "packages/lint/src/runtime.ts", "packages/lint/src/validate-action-body-compiles.ts", "packages/lint/src/validate-hook-body-compiles.test.ts", "packages/lint/src/validate-hook-body-compiles.ts", "packages/runtime/src/sandbox/quickjs-runner.ts", "packages/spec/src/migrations/entries/semantic/18.action-body-does-not-compile-refused.ts", "packages/spec/src/migrations/entries/semantic/18.hook-job-body-does-not-compile-refused.ts" ], "first_party_exposure": "0. 33 literal L2 bodies judged across examples/**, apps/**, skills/**, content/docs/** (releases excluded) and packages/qa/**, 0 refused. 22 are built from variables or interpolation, all in dogfood tests, and the dogfood battery is green. 9 hook bodies in compiled artifacts (app-crm 1, app-showcase 8), 0 refused. The showcase's one job carries a handler, not a body. os validate over 4 examples: 0 findings. One docs fence (hook-bodies.mdx, compiled-artifact shape) elides its body with an ellipsis: prose, not metadata.", "deviations": [ "overlap-check ran before pushes 1 (8329621bb) and 4 (ed1bf2038), not before pushes 2 (f58a65afe) and 3 (e1209577f). A run after the fact at e1209577f was clean.", "File surface grew beyond the claim: content/docs/deployment/cli.mdx, content/docs/getting-started/build-with-claude-code.mdx and content/docs/ui/react-pages.mdx (a forced 73 to 74 rule-count edit, check:docs-transcript-drift), and content/docs/deployment/validating-metadata.mdx (the same edit plus a door-table row for the new rule).", "PR body opens with the attribution comment, the Requested-by line and the signature line, as the dispatch ordered, so 'Fixes #34987' is line 4, not line 1.", "The relay action carries the relay's own discriminator key 'op': 'pr_create' besides title/head/base/body.", "Commits carry the model-free trailer pair the dispatch named, not the harness reminder's Co-Authored-By line with a model name.", "A container restart killed the first background gate sweep and dogfood run. Both re-ran in full on the final head ed1bf2038 after the one main merge (238661f47).", "The validating-metadata.mdx door-table row carries a tracker number (#34987), as its sibling rows do." ], "relay_writes": "3: pr_create (PR #35713), the os-dev-report comment on the PR, and its copy on card #34987", "api_writes": "3 relay writes: POST /repos/objectstack-ai/objectstack/pulls (draft, forced), POST /repos/objectstack-ai/objectstack/issues/35713/comments, POST /repos/objectstack-ai/objectstack/issues/34987/comments. Plus 4 git pushes to claude/project-thread-iswnar (not REST).", "mcp_calls": "0", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [ "carrier: none · noted, not filed. A hook or job body that still fails to compile at run time gets the runner's generic \"hook 'NAME' threw: SyntaxError\" sentence, not the coded actionBodyCompileFailure sentence actions get.", "carrier: seat (Skills-docs: follow-up owed) · skills/objectstack-data/references/data-hooks.md, section 'Sandbox restrictions', names no compile check." ] }objectstack-fleet commentedon Nov 20, 2026
repo:objectstack#1 · os-sales · session_01L6bhgTggz8AL2bCABoDGis
Merged · 2026-11-20T03:40Z · PR #35713 merged at
5ecf9374701d3fcb9de439c0bc09f7008992c80a; this card closed throughFixes #34987.Delivered: hook and job bodies are compiled at author time in the wrapper the runtime runs them in (
hookBodyFunctionExpression, now the runner's only spelling), refused aterrorashook-body-does-not-compile/job-body-does-not-compileonos validate,os build,os lintand the runtime publish gate for hook writes; the regex pattern/token split from PR #35672 is reused. ADR-0087 semantic entryhook-job-body-does-not-compile-refusedadded. Left, each awaiting triage and not started: #35714 (skills doc), #35715 (run-time compile failure reports a genericthrewsentence), #35720 (review nits N1–N5).pm:dispatchedremoved.Generated by Claude Code