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
security: os explain names the channel that opened a field — own row, another set's row, the default, View All, Modify All or viewAllFields (step 2 of #34365, additive) #36051
Premise corrected 7257037135 (repo:objectstack#2, 2026-11-29): after #36055 (PR #37371) View All / Modify All cast no field vote, so the channels are four (own row · another set's row · viewAllFields · default), the CLI is out of scope, and the Acceptance below is replaced by that comment's. Read it first.
Filing gate: ④ sub-card of the ruled decision #34365 (ruling 6912661484, verbatim 「同意,立决策卡」; implementation cards are cut after PR #34082, merged 2026-11-16T21:40Z) · Source: topic #34365
Parent: #34365 (step 2)
Blocked-by: #36050
Grade: left to triage. Suggested p2 (a step of the p2 security card #34365). Area: data. Type suggestion: Feature.
Dedupe: repo:objectstack-ai/objectstack is:issue viewAllFields → 3 hits: #34365 (the parent), #33828 (closed), #6015 (triage seat post). No card covers this step.
Business reason
When a field is readable that an author meant to hide, the author's first question is "which permission set opened it, and why". Today the answer needs reading the merge code: one set's View All / Modify All re-opening a field another set hides is invisible in the explanation. The ruled path (#34365 step 2) asks os explain to name the channel, so authors can find and fix the over-grant before the v19 switch, and see what the switch will change for them.
What to build
The access explanation (packages/plugins/plugin-security/src/explain-engine.ts, its output shape in packages/spec/src/security/explain.zod.ts, and the CLI packages/cli/src/commands/explain.ts) says, per field the merge decides, which channel cast the winning read and edit vote: the set's own row, another set's row, the default (no set names the field), View All, Modify All, or viewAllFields — and the set's name.
Read-only: explanation only, no enforcement change.
Additive to the explain output shape (new optional keys); existing consumers keep parsing.
Declarations the PR owes
Clause-②: yes if the explain output schema gains keys; Metadata-protocol: none (no authorable key). Contract review owed if packages/spec/src/** changes.
Acceptance
A test with two sets — one hiding obj.f, one holding View All on obj — shows the explanation naming View All on the second set as the channel that opened obj.f; same for Modify All and viewAllFields.
Gates green; L1 (+ L2 if the spec shape changes) PASS on the final head.
Triage: lands in domain:devx (os explain) · pm:blocked (Blocked-by #36050); rationale: area:data · Feature · step 2 of #34365: os explain names the channel that opened a field (own row, another set, the default, View All, Modify All, viewAllFields); additive → p2 (a step of p2 #34365) · size S.
Held · 2026-11-26T12:54Z · s2-data (seat 2) premise read: the card edits packages/spec/src/security/explain.zod.ts and explains the View All / Modify All channels "before the v19 switch". main is on protocol 19 since #37314, and #36055 (PR #37371) stops those two channels from voting on fields, so the current scope would be rewritten by #36055. Re-scope to the v19 channels (own row / another set / default / viewAllFields) after #36055 lands; then it is Clause-②: yes and owes a contract-review-tier L2.
Unlock · pm:blocked → pm:queue · every line-leading Blocked-by: / Restart-when: on this card (body and thread) was read at 2026-11-29T00:16Z, and each target is done: #36050 and #36055 both closed. Grade unchanged. Before dispatch, re-check the card's file surface on the merged ref.
Release: claim 7257087952 (session_01JQwxba2oTCUuCosPm6pkRu, repo:objectstack#2) · 2026-11-29T14:12Z · hand-off: the maintainer's account is at its weekly usage wall, so the seat stops all work. No code was written; branch claude/project-thread-ef335e carries no commit, so there is no Resume-from. Back to pm:queue, assignee cleared; the premise correction 7257037135 stands.
Readings the card thread took on origin/main75108ea (all three seat assumptions held), for the next holder:
packages/spec/src/security/explain.zod.ts:186: the fls layer has only verdict / detail / contributors (always [] for fls) / record; no per-field channel key.
packages/plugins/plugin-security/src/explain-engine.ts:3324-3398: mask = deps.getFieldMask(sets) (D10 intersection via intersectFieldMasks), partial from getPartialMaskRules, computedWithheld separate; only hidden/partial lists and a conditioned sentence. Wiring security-plugin-explain-access.ts:426: getFieldMask = getFieldPermissions + foldFieldRequiredPermissions (capability gates only close). The engine already reads deps.ql.getSchema(object) at :3206, enough to report default with no new dep.
Vote source permission-evaluator.ts:534-570getFieldPermissions: per-set fieldPermissionVote (rows with when and no judge: read as declared, no edit), union; then core viewAllFieldsReadVote on fields already merged (read-only, excludes the set's own readable:false rows). View All / Modify All cast no field vote.
Suggested design (route notes, not a ruling):
spec: optional fieldChannels: [{ field, read?: {channel, sets?}, edit?: {channel, sets?} }] on ExplainLayerSchema, channel ∈ own_row | other_set_row | view_all_fields | default; keep the channel schema unexported (as ExplainRecordVerdictSchema) to avoid an api-surface delta.
evaluator: one read-only method returning per-field readers / hiders / editors / lockers / viewAllFields set names from the same vote function; the engine names a channel only where the final mask (capability gates, D10 intersection, computedWithheld) leaves the field readable / editable: a row vote → other_set_row if another set has readable:false, else own_row; else a viewAllFields set → view_all_fields; no set names it → default. Edit the same way; viewAllFields never grants edit.
Existing pins explain-engine.test.ts:370/469 ('No field-level masking applies.') are unaffected.
Owed: three acceptance cases in explain-engine.test.ts, gen:schema && gen:docs, content/docs/permissions/field-level-security.mdx, changeset (Clause-②: yes · Metadata-protocol: none, minor), contract-review-tier L2.
Re-claim after the hand-off release 7257122710 was cancelled: the maintainer, verbatim, in this account's fleet project: 「不用交接」 (2026-11-29T14:12Z). Same thread session and branch as claim 7257087952; release 7257122710's readings and design notes stand as the thread's route notes.
Claim: PM loop round 1
Session: session_01JQwxba2oTCUuCosPm6pkRu
Thread session: session_01JQwxba7R1thfXzYipYgzGJ
Account: os-warren
Branch: claude/project-thread-ef335e
Worktree: objectstack-issue-36051
Domain: domain:devx
Seat: repo:objectstack#2
Area: o2-D
File surface: packages/spec/src/security/explain.zod.ts (new optional per-field channel key), packages/plugins/plugin-security/src/explain-engine.ts, packages/plugins/plugin-security/src/permission-evaluator.ts (vote source only), their tests, generated spec baselines and reference docs, content/docs/permissions/field-level-security.mdx, one changeset; not packages/cli (stop on breach; explain in the report)
Container & model: M, mode:thread, model: default tier (dispatch-gates.mjs --tier: "no path-derived mandate"; the explain.zod.ts contract-surface hit decides the thread and the L2 tier, not the build tier; served claude-opus-5-5 per the thread's first report), effort: high
Clause-②: yes
Metadata-protocol: none
Responsibility: n/a — not a defect card
Thread-read: 7257122710
Premise: corrected 7257037135
Serial constraints cleared: none (seat overlap read: no in-flight claim on these files)
{
"issue": 36051,
"status": "done",
"branch": "claude/project-thread-ef335e",
"pr": "https://github.com/objectstack-ai/objectstack/pull/38616",
"session": "session_01JQwxba7R1thfXzYipYgzGJ",
"premise_still_valid": true,
"summary": "Implemented the corrected premise (7257037135): the fls layer of the access explanation gains an optional fieldChannels list naming, per field, the channel that cast the winning read and edit vote (own_row, other_set_row, view_all_fields, default) with the voting sets. The vote source is a new PermissionEvaluator.fieldVoteSources built from the merge's own vote functions; the engine only names channels for what the enforcement mask (capability gates, D10 intersection, step-4 hidden) keeps open. Read-only, no enforcement change; the CLI is untouched. Seat assumptions measured true on 75108ea6: explain.zod.ts fls layer had no per-field channel; explain-engine.ts fls built hidden/partial lists only; vote source permission-evaluator.ts getFieldPermissions + viewAllFieldsReadVote.",
"tests": "head 048ced23: plugin-security explain-engine.test.ts 147/147 (6 new acceptance cases). On 67523d47: pnpm --filter @objectstack/plugin-security test 290/290 files, 7358 passed / 45 skipped (lock VERDICT command-exit 0); plugin-security typecheck exit 0; spec vitest src/security 15/15 files 420/420 + spec typecheck exit 0. Ablation: other_set_row branch forced to own_row via scripts/ablation-replace.mjs (anchor 1->0, blob 49a3f9a5->5dac1c5d) turned 'other_set_row' case red (1 failed | 5 passed); restored, git diff HEAD empty. Source-imported test, no dist leg.",
"gates": "dispatch-gates --commands (merge base 75108ea6): 119 families; --ran with exit codes: 115 exit 0, 4 NOT MEASURED (exit 3 prerequisite): check-plugin-teardown-shape --self-test (shallow clone), spec check:skill-examples (client-react dist), check:dual-build-cjs-loads (unbuilt dists), check:i18n (CLI not built); 0 unrun. spec check:generated: docs + strictness-ledger regenerated via --fix, re-check green. Measured on 67523d47 plus the one-string edit that became 048ced23. PR check-runs: not yet concluded at report time; seat reads CI.",
"dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm",
"mcp_calls": "3 — mcp__github__issue_read (get #36051, get_comments #36051, get #34365); no write tools",
"api_writes": "2 relay strokes — fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST issues/38616/assignees, run 46276785974, read-back identical 7137 bytes); this os-dev-report comment (POST issues/36051/comments)",
"open_questions": [],
"security_findings": "none",
"out_of_scope_findings": [],
"line_budget": "10 files, +330/-9 (code: explain.zod.ts +45, permission-evaluator.ts +60, explain-engine.ts +66/-2; test +92; generated/docs/changeset rest)",
"deviations": [
"Order carried no Container & model line; served claude-opus-5-5 effort high reported to seat before code.",
"Work paused ~2 min on the seat's hand-off order and resumed on Warren's 「不用交接」; worktree rebuilt from origin/main 75108ea6, no work lost.",
"No harness review request after PR create (dispatch-runbook: thread does not request review); assignee os-warren rode pr_create.",
"Prose: one fls detail sentence names fields one held set hides that another set re-opens; existing pinned detail strings unchanged."
],
"files_changed": [
".changeset/36051-explain-field-channels.md",
"content/docs/permissions/field-level-security.mdx",
"content/docs/references/security/explain.mdx",
"docs/audits/2026-07-unknown-key-strictness-ledger.counts/security.md",
"packages/plugins/plugin-security/src/explain-engine.test.ts",
"packages/plugins/plugin-security/src/explain-engine.ts",
"packages/plugins/plugin-security/src/permission-evaluator.ts",
"packages/spec/authorable-surface/security.json",
"packages/spec/docs/references/api/record-page.md",
"packages/spec/src/security/explain.zod.ts"
]
}
Claim amendment 1 to claim 7257132878 · 2026-11-29T15:15Z · the Metadata-protocol kind, on the gate's measurement: the new fieldChannels key moves the packages/spec/authorable-surface/security.json shard, which Check Changeset reads as a protocol kind (job 141389940428 on 048ced2). PR #38616 head 24a778d declares added, bumps @objectstack/spec minor and carries Skills-docs: none (a read-only key of the explain answer, nothing an author writes).
merged, head 6c9b214e (seat ACCEPT 7264585361 · L2 PASS 7264570077)
This card
closed completed by the merge
Left over: none on this card. Parent #34365: its last open objectstack child is now landed; only step 4 (HotCRM sales_manager explicit rows) remains, in the hotcrm lane.
Activity
viewAllFieldsbit carries the admin channel (end state, v19) #34365objectstack-fleet commentedon Nov 21, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Triage: lands in
domain:devx(os explain) ·pm:blocked(Blocked-by #36050); rationale: area:data · Feature · step 2 of #34365:os explainnames the channel that opened a field (own row, another set, the default, View All, Modify All,viewAllFields); additive → p2 (a step of p2 #34365) · size S.objectstack-fleet commentedon Nov 21, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
2026-11-21T14:49Z · Unblocked: its only
Blocked-by:#36050 is closed as completed.pm:blocked→pm:queue; grade p2 and lane unchanged.feat(security): add the read-only viewAllFields object-permission bit (…
objectstack-fleet commentedon Nov 26, 2026
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA
Held · 2026-11-26T12:54Z ·
s2-data(seat 2) premise read: the card editspackages/spec/src/security/explain.zod.tsand explains the View All / Modify All channels "before the v19 switch".mainis on protocol 19 since #37314, and #36055 (PR #37371) stops those two channels from voting on fields, so the current scope would be rewritten by #36055. Re-scope to the v19 channels (own row / another set / default /viewAllFields) after #36055 lands; then it isClause-②: yesand owes a contract-review-tier L2.Blocked-by: #36055
objectstack-fleet commentedon Nov 29, 2026
triage#1 · sunhaolin · session_017xRBcSxvUE3fDrox79CL9t
Unlock ·
pm:blocked→pm:queue· every line-leadingBlocked-by:/Restart-when:on this card (body and thread) was read at 2026-11-29T00:16Z, and each target is done: #36050 and #36055 both closed. Grade unchanged. Before dispatch, re-check the card's file surface on the merged ref.Recorded 2026-11-29T00:16Z.
6 remaining items
objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#2 · os-warren · session_01JQwxba2oTCUuCosPm6pkRu
Release: claim 7257087952 (
session_01JQwxba2oTCUuCosPm6pkRu,repo:objectstack#2) · 2026-11-29T14:12Z · hand-off: the maintainer's account is at its weekly usage wall, so the seat stops all work. No code was written; branchclaude/project-thread-ef335ecarries no commit, so there is no Resume-from. Back topm:queue, assignee cleared; the premise correction 7257037135 stands.Readings the card thread took on
origin/main75108ea (all three seat assumptions held), for the next holder:packages/spec/src/security/explain.zod.ts:186: theflslayer has only verdict / detail / contributors (always[]for fls) / record; no per-field channel key.packages/plugins/plugin-security/src/explain-engine.ts:3324-3398: mask =deps.getFieldMask(sets)(D10 intersection viaintersectFieldMasks), partial fromgetPartialMaskRules,computedWithheldseparate; only hidden/partial lists and a conditioned sentence. Wiringsecurity-plugin-explain-access.ts:426:getFieldMask=getFieldPermissions+foldFieldRequiredPermissions(capability gates only close). The engine already readsdeps.ql.getSchema(object)at :3206, enough to reportdefaultwith no new dep.permission-evaluator.ts:534-570getFieldPermissions: per-setfieldPermissionVote(rows withwhenand no judge: read as declared, no edit), union; then coreviewAllFieldsReadVoteon fields already merged (read-only, excludes the set's ownreadable:falserows). View All / Modify All cast no field vote.Suggested design (route notes, not a ruling):
fieldChannels: [{ field, read?: {channel, sets?}, edit?: {channel, sets?} }]onExplainLayerSchema,channel∈own_row | other_set_row | view_all_fields | default; keep the channel schema unexported (asExplainRecordVerdictSchema) to avoid an api-surface delta.other_set_rowif another set hasreadable:false, elseown_row; else a viewAllFields set →view_all_fields; no set names it →default. Edit the same way; viewAllFields never grants edit.explain-engine.test.ts:370/469('No field-level masking applies.') are unaffected.explain-engine.test.ts,gen:schema && gen:docs,content/docs/permissions/field-level-security.mdx, changeset (Clause-②: yes·Metadata-protocol: none, minor), contract-review-tier L2.objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#2 · os-warren · session_01JQwxba2oTCUuCosPm6pkRu
Re-claim after the hand-off release 7257122710 was cancelled: the maintainer, verbatim, in this account's fleet project: 「不用交接」 (2026-11-29T14:12Z). Same thread session and branch as claim 7257087952; release 7257122710's readings and design notes stand as the thread's route notes.
Claim: PM loop round 1
Session:
session_01JQwxba2oTCUuCosPm6pkRuThread session:
session_01JQwxba7R1thfXzYipYgzGJAccount:
os-warrenBranch:
claude/project-thread-ef335eWorktree:
objectstack-issue-36051Domain:
domain:devxSeat:
repo:objectstack#2Area:
o2-DFile surface:
packages/spec/src/security/explain.zod.ts(new optional per-field channel key),packages/plugins/plugin-security/src/explain-engine.ts,packages/plugins/plugin-security/src/permission-evaluator.ts(vote source only), their tests, generated spec baselines and reference docs,content/docs/permissions/field-level-security.mdx, one changeset; notpackages/cli(stop on breach; explain in the report)Container & model:
M,mode:thread,model: default tier (dispatch-gates.mjs --tier: "no path-derived mandate"; the explain.zod.ts contract-surface hit decides the thread and the L2 tier, not the build tier; served claude-opus-5-5 per the thread's first report),effort: highClause-②: yes
Metadata-protocol: none
Responsibility:
n/a — not a defect cardThread-read: 7257122710
Premise: corrected 7257037135
Serial constraints cleared:
none (seat overlap read: no in-flight claim on these files)objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#2 · os-warren · session_01JQwxba7R1thfXzYipYgzGJ
os-dev-report
{ "issue": 36051, "status": "done", "branch": "claude/project-thread-ef335e", "pr": "https://github.com/objectstack-ai/objectstack/pull/38616", "session": "session_01JQwxba7R1thfXzYipYgzGJ", "premise_still_valid": true, "summary": "Implemented the corrected premise (7257037135): the fls layer of the access explanation gains an optional fieldChannels list naming, per field, the channel that cast the winning read and edit vote (own_row, other_set_row, view_all_fields, default) with the voting sets. The vote source is a new PermissionEvaluator.fieldVoteSources built from the merge's own vote functions; the engine only names channels for what the enforcement mask (capability gates, D10 intersection, step-4 hidden) keeps open. Read-only, no enforcement change; the CLI is untouched. Seat assumptions measured true on 75108ea6: explain.zod.ts fls layer had no per-field channel; explain-engine.ts fls built hidden/partial lists only; vote source permission-evaluator.ts getFieldPermissions + viewAllFieldsReadVote.", "tests": "head 048ced23: plugin-security explain-engine.test.ts 147/147 (6 new acceptance cases). On 67523d47: pnpm --filter @objectstack/plugin-security test 290/290 files, 7358 passed / 45 skipped (lock VERDICT command-exit 0); plugin-security typecheck exit 0; spec vitest src/security 15/15 files 420/420 + spec typecheck exit 0. Ablation: other_set_row branch forced to own_row via scripts/ablation-replace.mjs (anchor 1->0, blob 49a3f9a5->5dac1c5d) turned 'other_set_row' case red (1 failed | 5 passed); restored, git diff HEAD empty. Source-imported test, no dist leg.", "gates": "dispatch-gates --commands (merge base 75108ea6): 119 families; --ran with exit codes: 115 exit 0, 4 NOT MEASURED (exit 3 prerequisite): check-plugin-teardown-shape --self-test (shallow clone), spec check:skill-examples (client-react dist), check:dual-build-cjs-loads (unbuilt dists), check:i18n (CLI not built); 0 unrun. spec check:generated: docs + strictness-ledger regenerated via --fix, re-check green. Measured on 67523d47 plus the one-string edit that became 048ced23. PR check-runs: not yet concluded at report time; seat reads CI.", "dogfood_battery": "n/a — no `!` in the PR title and no (narrowing) arm", "mcp_calls": "3 — mcp__github__issue_read (get #36051, get_comments #36051, get #34365); no write tools", "api_writes": "2 relay strokes — fleet-write pr_create (POST /repos/objectstack-ai/objectstack/pulls + POST issues/38616/assignees, run 46276785974, read-back identical 7137 bytes); this os-dev-report comment (POST issues/36051/comments)", "open_questions": [], "security_findings": "none", "out_of_scope_findings": [], "line_budget": "10 files, +330/-9 (code: explain.zod.ts +45, permission-evaluator.ts +60, explain-engine.ts +66/-2; test +92; generated/docs/changeset rest)", "deviations": [ "Order carried no Container & model line; served claude-opus-5-5 effort high reported to seat before code.", "Work paused ~2 min on the seat's hand-off order and resumed on Warren's 「不用交接」; worktree rebuilt from origin/main 75108ea6, no work lost.", "No harness review request after PR create (dispatch-runbook: thread does not request review); assignee os-warren rode pr_create.", "Prose: one fls detail sentence names fields one held set hides that another set re-opens; existing pinned detail strings unchanged." ], "files_changed": [ ".changeset/36051-explain-field-channels.md", "content/docs/permissions/field-level-security.mdx", "content/docs/references/security/explain.mdx", "docs/audits/2026-07-unknown-key-strictness-ledger.counts/security.md", "packages/plugins/plugin-security/src/explain-engine.test.ts", "packages/plugins/plugin-security/src/explain-engine.ts", "packages/plugins/plugin-security/src/permission-evaluator.ts", "packages/spec/authorable-surface/security.json", "packages/spec/docs/references/api/record-page.md", "packages/spec/src/security/explain.zod.ts" ] }objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#2 · os-warren · session_01JQwxba2oTCUuCosPm6pkRu
Claim amendment 1 to claim 7257132878 · 2026-11-29T15:15Z · the Metadata-protocol kind, on the gate's measurement: the new
fieldChannelskey moves thepackages/spec/authorable-surface/security.jsonshard, which Check Changeset reads as a protocol kind (job 141389940428 on 048ced2). PR #38616 head 24a778d declaresadded, bumps@objectstack/specminor and carriesSkills-docs: none(a read-only key of the explain answer, nothing an author writes).Clause-②: yes
Metadata-protocol: added
objectstack-fleet commentedon Nov 29, 2026
repo:objectstack#2 · os-warren · session_01JQwxba2oTCUuCosPm6pkRu
2026-11-29T23:36Z · ACCEPT → PR #38616 comment 7264585361(Head-sha 6c9b214;L2 PASS 7264570077)。发布冻结:PR 保持 draft、不入队,解冻后席位翻 ready 并入队。
objectstack-fleet commentedon Nov 30, 2026
repo:objectstack#2 · os-warren · session_01JQwxba2oTCUuCosPm6pkRu
2026-11-30T07:37Z · Landed. PR #38616 merged (2026-11-30T07:36Z, merge commit
751e83941b);Fixesclosed this card. Clearingpm:dispatched.6c9b214e(seat ACCEPT 7264585361 · L2 PASS 7264570077)Left over: none on this card. Parent #34365: its last open objectstack child is now landed; only step 4 (HotCRM
sales_managerexplicit rows) remains, in the hotcrm lane.