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
feat(lint,spec): L2 hook body 写不存在字段从 accepted gap 变为作者时 lint 告警 (#4271) (#4305)
* feat(lint,spec): L2 hook-body writes to undeclared fields warn at author time (#4271)
An L2 (language:'js') hook body writing a field the target object never
declares runs clean in the sandbox, reports success, and the unknown column
never lands — the #4001 silent-no-op failure mode at the runtime-expression
layer. New advisory rule `hook-body-write-unknown-field` parses the body
(never executes it), resolves the literal writes declared in the
HOOK_BODY_WRITE_PATTERNS ledger against the target object's declared + system
fields, and warns with a did-you-mean. Wired via REFERENCE_INTEGRITY_RULES
(validate/lint/compile at once); TypeScript parser loads lazily off the kernel
boot path; every ledger entry is reconciliation-tested against the extractor.
Statically unknowable writes bail silently — zero false positives over
completeness. The hook-body.zod.ts "accepted gap" note now points at the lint.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(lint): spell the dedupe separator as the backslash-u0000 escape, not a raw NUL byte
The raw byte trips check:nul-bytes (a NUL makes grep treat the file as binary, dropping it out of every grep-based lint); the escape sequence is byte-identical at runtime.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
0 commit comments