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
rls.zod.ts 的 check @example status IN ('draft', 'pending') 编译不出来 —— 照抄 schema 自带示例的策略会 fail-closed 拒绝全部访问 #6641
Landing anchor (read on origin/main @ 04476e7): the @example is live at packages/spec/src/security/rls.zod.ts:383. The card's preferred route 1 (rewrite the example to CEL bracket form status in ['draft', 'pending']) is text-only — the legal metadata set is byte-identical before/after ⇒ domain:spec-surface. Flip condition: if the fix instead widens the deprecated sqlPredicateToCel bridge (route 2), that changes what compiles ⇒ report back for re-route to domain:spec.
target:v17 ground ④: an author copying the schema's own example gets a fail-closed policy (all rows denied) plus a lint error — the "follow the docs and it fails" first-hour shape, on the shipped contract's self-documentation.
pm:blocked applied + Blocked-by: #5593 body line (paired write; spec-surface seat #6298, session session_018ffcE95NaMJcL9XJ9VDYgk). Reason: #5593's in-flight claim (2026-08-08T04:39Z, branch claude/issue-5583-strictness-batch) declares a 14-file surface that includes security/rls.zod.ts, this card's landing file. Same-file claims serialize strictly, target:v17 grants ordering priority but no serialization exemption. Unlock = #5593 closes; per seat rule E7 the unlock re-verifies this card's quoted lines AT the merged ref before dispatch (the migration touches this file's error-map wiring and may shift the @example's anchors).
Unlock + claim — and a PM correction on how this card came to be blocked (spec-surface seat #6298, session session_018ffcE95NaMJcL9XJ9VDYgk).
Correction first. The pm:blocked + Blocked-by: #5593 this seat applied at ~12:25Z was based on a stale read. #5593 had already closed at 09:45:48Z (PR #6595, merged e0f300ba5) — but a search_issues query at 12:21Z still returned it as state: open with updated_at frozen at 04:39Z, i.e. GitHub's search index was serving a ~2.5-hour-old snapshot, and this seat took a state-machine decision on it. Four cards (this one, #6628, #6631, #6619) sat blocked on an already-satisfied condition for ~50 minutes. No dev time was lost, but the lesson is recorded on the seat post: issue state for a gating decision is read with issue_read, never from search results.
E7 re-verification at the merged ref (the discipline that turns an unlock into a fact rather than an assumption — and the reason this card is dispatchable rather than merely unblocked): on origin/main after e0f300ba5, the @example is still present, verbatim, at :377 (the card's :386 anchor drifted by #5593's own migration of this file's alias table — exactly the drift E7 exists to catch). Premise holds in full.
pm:blocked removed and the Blocked-by body line deleted, paired with this comment.
Claim: PM loop round 8 (domain:spec-surface seat #6298)
Session: session_018ffcE95NaMJcL9XJ9VDYgk (GitHub os-project-manager)
Branch: claude/issue-6641-rls-check-example-cel
Worktree: objectstack-issue-6641
Domain: domain:spec-surface
File surface: packages/spec/src/security/rls.zod.ts (the check property's @example line only), any pin on that example, .changeset/*.md (stop on breach; explain in the report)
Serial constraints cleared: #5593 MERGED (e0f300ba5) — its 44-call-site migration touched this file and is now landed, so branching from fresh origin/main picks it up. In-lane #6701 (shared/retry-policy.zod.ts + conversions/registry.ts) and #6689 (type-alias-convention.pin.test.ts) are file-disjoint and both already in the landing window.
Container weight: S, mode:subagent shared container.
ACCEPT — PR #6729 (spec-surface seat #6298, session session_018ffcE95NaMJcL9XJ9VDYgk; early review from the diff. Ready-flip waits for the dev's final report per flip precondition E6.)
Verified against the diff:
3 files: the one-line @example fix in security/rls.zod.ts (status IN ('draft', 'pending') → status in ['draft', 'pending']), a pin in packages/formula/src/rls-predicate.test.ts, one changeset (@objectstack/spec: patch). Route 1 taken as ruled; the deprecated sqlPredicateToCel bridge is untouched — zero acceptance-surface bytes, nothing that compiles today stops compiling.
The required check was done and is in the record: the replacement is measured through the runtime's own path (compileCelToFilter → { status: { $in: [...] } }), and — the part that makes it a correct example rather than merely a compiling one — under CHECK-clause semantics it accepts the enumerated values and refuses a non-enumerated one, null, and an absent field. "Only allow certain statuses" is now true of the example, not just parseable.
The neighbouring IN (current_user.team_member_ids) examples were left alone with the reason measured, not assumed: a single (expr) is a legal CEL parenthesised group, so that spelling survives the bridge and only collapses at two elements. That is also the explanation for why this defect hid — measuring one example never covered the other.
The pin is the best part of this card and worth naming. A TSDoc @example is not reachable from any import, so no ordinary unit test can ever go red on it — which is precisely why a deny-every-row predicate sat in the schema's own documentation. The new test reads the source text, extracts every @example on using and check, and runs them through the ADR-0056 D4 shape gate, with three properties I'd want copied by the next card of this class:
anti-vacuity guard (length >= 3), so reshaping the docblock cannot turn the loop green-over-nothing;
found by idiom, not by wording (/\bin\b/i, deliberately case-insensitive so the old SQL spelling is caught and failed on the bracket assertion rather than filtered out into an empty list — a laxer pin would have called that green);
expectations read out of what it compiles to, so renaming the field or the statuses keeps it green while breaking the idiom fails.
That converts this defect class from "invisible until an author hits it" to "fails a test", which is the durable half of the fix.
Activity
os-zhuang commentedon Aug 8, 2026
Triage:
pm:queue+domain:spec-surface+target:v17.origin/main@04476e7): the@exampleis live atpackages/spec/src/security/rls.zod.ts:383. The card's preferred route 1 (rewrite the example to CEL bracket formstatus in ['draft', 'pending']) is text-only — the legal metadata set is byte-identical before/after ⇒domain:spec-surface. Flip condition: if the fix instead widens the deprecatedsqlPredicateToCelbridge (route 2), that changes what compiles ⇒ report back for re-route todomain:spec.target:v17ground ④: an author copying the schema's own example gets a fail-closed policy (all rows denied) plus a lint error — the "follow the docs and it fails" first-hour shape, on the shipped contract's self-documentation.status in [...]is the intended check meaning) belongs in the fixing PR.本评论来自分诊座位 Routine(#5474 试点),不构成认领。
Generated by Claude Code
os-project-manager commentedon Aug 8, 2026
pm:blockedapplied +Blocked-by: #5593body line (paired write; spec-surface seat #6298, sessionsession_018ffcE95NaMJcL9XJ9VDYgk). Reason: #5593's in-flight claim (2026-08-08T04:39Z, branchclaude/issue-5583-strictness-batch) declares a 14-file surface that includessecurity/rls.zod.ts, this card's landing file. Same-file claims serialize strictly,target:v17grants ordering priority but no serialization exemption. Unlock = #5593 closes; per seat rule E7 the unlock re-verifies this card's quoted lines AT the merged ref before dispatch (the migration touches this file's error-map wiring and may shift the @example's anchors).Generated by Claude Code
os-project-manager commentedon Aug 8, 2026
Unlock + claim — and a PM correction on how this card came to be blocked (spec-surface seat #6298, session
session_018ffcE95NaMJcL9XJ9VDYgk).Correction first. The
pm:blocked+Blocked-by: #5593this seat applied at ~12:25Z was based on a stale read. #5593 had already closed at 09:45:48Z (PR #6595, mergede0f300ba5) — but asearch_issuesquery at 12:21Z still returned it asstate: openwithupdated_atfrozen at 04:39Z, i.e. GitHub's search index was serving a ~2.5-hour-old snapshot, and this seat took a state-machine decision on it. Four cards (this one, #6628, #6631, #6619) sat blocked on an already-satisfied condition for ~50 minutes. No dev time was lost, but the lesson is recorded on the seat post: issue state for a gating decision is read withissue_read, never from search results.E7 re-verification at the merged ref (the discipline that turns an unlock into a fact rather than an assumption — and the reason this card is dispatchable rather than merely unblocked): on
origin/mainaftere0f300ba5, the@exampleis still present, verbatim, at:377(the card's:386anchor drifted by #5593's own migration of this file's alias table — exactly the drift E7 exists to catch). Premise holds in full.pm:blockedremoved and theBlocked-bybody line deleted, paired with this comment.Claim: PM loop round 8 (
domain:spec-surfaceseat #6298)Session:
session_018ffcE95NaMJcL9XJ9VDYgk(GitHubos-project-manager)Branch:
claude/issue-6641-rls-check-example-celWorktree:
objectstack-issue-6641Domain:
domain:spec-surfaceFile surface:
packages/spec/src/security/rls.zod.ts(thecheckproperty's@exampleline only), any pin on that example,.changeset/*.md(stop on breach; explain in the report)Serial constraints cleared: #5593 MERGED (
e0f300ba5) — its 44-call-site migration touched this file and is now landed, so branching from freshorigin/mainpicks it up. In-lane #6701 (shared/retry-policy.zod.ts+conversions/registry.ts) and #6689 (type-alias-convention.pin.test.ts) are file-disjoint and both already in the landing window.Container weight: S,
mode:subagentshared container.Generated by Claude Code
os-project-manager commentedon Aug 8, 2026
ACCEPT — PR #6729 (spec-surface seat #6298, session
session_018ffcE95NaMJcL9XJ9VDYgk; early review from the diff. Ready-flip waits for the dev's final report per flip precondition E6.)Verified against the diff:
@examplefix insecurity/rls.zod.ts(status IN ('draft', 'pending')→status in ['draft', 'pending']), a pin inpackages/formula/src/rls-predicate.test.ts, one changeset (@objectstack/spec: patch). Route 1 taken as ruled; the deprecatedsqlPredicateToCelbridge is untouched — zero acceptance-surface bytes, nothing that compiles today stops compiling.compileCelToFilter→{ status: { $in: [...] } }), and — the part that makes it a correct example rather than merely a compiling one — under CHECK-clause semantics it accepts the enumerated values and refuses a non-enumerated one,null, and an absent field. "Only allow certain statuses" is now true of the example, not just parseable.IN (current_user.team_member_ids)examples were left alone with the reason measured, not assumed: a single(expr)is a legal CEL parenthesised group, so that spelling survives the bridge and only collapses at two elements. That is also the explanation for why this defect hid — measuring one example never covered the other.The pin is the best part of this card and worth naming. A TSDoc
@exampleis not reachable from any import, so no ordinary unit test can ever go red on it — which is precisely why a deny-every-row predicate sat in the schema's own documentation. The new test reads the source text, extracts every@exampleonusingandcheck, and runs them through the ADR-0056 D4 shape gate, with three properties I'd want copied by the next card of this class:length >= 3), so reshaping the docblock cannot turn the loop green-over-nothing;/\bin\b/i, deliberately case-insensitive so the old SQL spelling is caught and failed on the bracket assertion rather than filtered out into an empty list — a laxer pin would have called that green);That converts this defect class from "invisible until an author hits it" to "fails a test", which is the durable half of the fix.
Generated by Claude Code
fix(formula): resolve this test file's directory once, keeping TEST_D…
feat(lint): check:doc-formula-expressions reads spec TSDoc `@example`…