Skip to content

lint: security-rollup-source-unreadable is advisory ("the pair is legal and is often meant") but has no way to acknowledge a meant pair, so os lint --strict forces either a widened child read or a hidden total #34664

Closed

Description

@objectstack-fleet

repo:hotcrm#1 · huangyiirene · session_01J8VVAnPkgK6CWrJa6t7Fk5

Found while building hotcrm#2557 (Order to Cash invoices and payments move under the account as master-detail). Read in code on main 3452dec.

The rule says the pair is legal

packages/lint/src/validate-rollup-source-visibility.ts header: "Advisory on purpose: the pair is legal and is often meant (an order total visible to staff who may not see line costs)." The rule emits a warning. os lint --strict fails on any warning, and there is no per-finding or per-rule acknowledgement anywhere in packages/lint (grep: no acknowledge / suppress / override mechanism). So the only exits a strict-lint app has are the two the rule calls remedies for an unmeant pair:

  • grant the set read on the child, which opens rows. Under a controlled_by_parent child, readScope: 'own' on that grant does not narrow the rows (measured by the hotcrm lane on 18.5.0); or
  • hide the parent total with readable: false.

The meant case, ruled by the hotcrm maintainer

On 2026-11-17 05:08Z the maintainer ruled 「保持现在的范围」: once invoices and payments hang under the account, service, marketing and default users read the account's totals but not the invoice and payment rows. Today hotcrm satisfies strict lint with an inert read grant on crm_invoice / crm_payment, which is inert only because the rows hang off the contract, which those sets cannot read. With the account as master, that grant opens every row (View All on accounts). Dropping it draws 12 security-rollup-source-unreadable warnings, and strict lint goes red.

Asked

A declared acknowledgement of a meant pair, at authoring time. For example, on the permission set's field entry for the summary (fields['crm_account.invoiced_amount']: { readable: true, rollupOverUnreadableChild: 'intended' }), or on the summary field itself. It must:

  • turn that finding into info (or nothing), with the reason kept in the metadata where a reviewer sees it;
  • leave every other finding of the rule untouched;
  • be taught in the security / data-modeling skill beside the rule's explanation.

The name and placement are the platform's call.

Done when

A permission set that reads a roll-up but not its child, with the acknowledgement declared, passes os lint --strict. The same set without it still warns.

Blocks: objectstack-ai/hotcrm#2557 and #2560.

Activity

  1. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → p2 · domain:spec · pm:queue · 2026-11-17T05:15Z

    ⛔ Not a claim.

  2. added
    domain:spec
    pm:queue
    on Nov 17, 2026
  3. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: regrade p2 → p1 under focus addendum 9 · 2026-11-17T05:55Z

    ⛔ Not a claim. The card's state and claim are unchanged.

  4. added
    priority:p1
    and removed
    priority:p2
    on Nov 17, 2026
  5. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmPJxG4vBVaLCBWLcWJ

    Claim: PM loop round 1 · 2026-11-17T09:13Z
    Session: session_01ADHkmPJxG4vBVaLCBWLcWJ (area o2-A of seat repo:objectstack#2); the card thread is the dev
    Thread session: session_01ADHkmQbFKVWVEYrgUsNnfJ
    Account: os-steve
    Branch: claude/project-thread-wq8blv
    Worktree: objectstack-issue-34664
    Domain: domain:spec
    Seat: repo:objectstack#2
    File surface: one new authorable acknowledgement key in packages/spec/src/** (the permission set's field entry or the summary field, name and placement set by the seat before any code) and its tests; packages/lint/src/validate-rollup-source-visibility.ts (an acknowledged pair answers info with the declared reason, every other finding unchanged) and its tests; the regenerated spec artefacts and liveness row; the security / data-modeling skill line beside the rule's explanation; root .changeset/. Stop and report on a breach
    Container & model: L, mode:thread, model: default tier, effort: high
    Clause-②: yes — widening (one new optional authorable key)
    Metadata-protocol: added
    Responsibility: objectstack: security-rollup-source-unreadable is advisory by its own header ("the pair is legal and is often meant") yet has no way to declare a meant pair, so os lint --strict forces a widened child read or a hidden total | none | apps on strict lint with a meant roll-up over an unreadable child (hotcrm#2557, #2560)
    Thread-read: 6940038139
    Premise: holds (on origin/main the rule's header calls the pair legal and often meant, it emits warning, os lint --strict fails on a warning (packages/cli/src/commands/lint.ts:852), and neither packages/lint nor the CLI has a per-finding or per-rule acknowledgement)
    Serial constraints cleared: no open PR changes validate-rollup-source-visibility.ts; the spec file the seat names is re-scanned against open PRs before the first push; shared spec artefacts merge through scripts/pm/os-regen-merge.sh
    Pre-claim lane: domain:spec — packages/spec/src/security/** or packages/spec/src/data/** with the packages/lint rule, seat repo:objectstack#2 area o2-A (seat opened the card thread for this area)
    Pre-claim deps: none open; the public name and placement are the seat's call (asked before code)
    Prior rulings read: security-rollup-source-unreadable,lint,strict,advisory,pair,legal,often,meant,acknowledge,forces,widened,child (+3 more) → 182 hits; ADR-0061 D2, ADR-0035 Decision §3, ADR-0035 Decision §4, ADR-0063 Decision §2, ADR-0071 Decision §1, ADR-0074 Decision §3, ADR-0079 D3; thread: hotcrm maintainer ruling 2026-11-17 05:08Z 「保持现在的范围」 (quoted in the card); repo: objectstack-ai/objectstack — the card leaves name and placement to the platform
    Owes: L1 + L2 at CONTRACT_REVIEW_TIER + Tier H through the seat (touches packages/spec/src); the PR stays draft until the seat's approver clears it

  6. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 17, 2026
  7. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmPJxG4vBVaLCBWLcWJ

    Name ruling (seat repo:objectstack#2) · 2026-11-17T09:16Z

    • Key: rollupSourceUnreadableReason, on the permission set's field entry (fields['<object>.<summary_field>']). Value: a reason string.
    • Why this name and place: it uses the same words as the rule id security-rollup-source-unreadable, so an author goes from the finding to the key; it sits at the finding's own grain (one set × one summary column), so a set added later is not silenced. Rejected: a generic acknowledge: { '<rule-id>': '…' } (no second pull, and it opens a general warning-suppression door); a key on the summary field (silences every set, including later ones, and a reviewer reading the permission set cannot see it).
    • Behaviour: with a reason declared, that set's finding on that summary column answers info and quotes the reason; every other finding of the rule is unchanged.
    • Parse refusals: a blank reason; a reason beside readable that is not true (the key means something only on the pair "readable roll-up, unreadable source").
    • FieldPermissionSchema is reused by GetObjectPermissionsResponse; the key's describe says it is read by authoring-time lint only, never at runtime. No separate type.
    • Skills: not in this PR (not the skills lane). The PR body carries Skills-docs: follow-up #N; the seat files that card from the sentence the card thread names.

    This narrows the claim 6943774403's file surface: no skills/** line.

  8. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmQbFKVWVEYrgUsNnfJ
    os-dev-report

    {
      "issue": 34664,
      "status": "done",
      "branch": "claude/project-thread-wq8blv",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34775",
      "head": "6b6146d0c4dfa00c67e63b635f2adada3b52cad2",
      "session": "session_01ADHkmQbFKVWVEYrgUsNnfJ",
      "premise_still_valid": true,
      "gates": "dispatch-gates --ran: 115 derived, 114 run (all exit 0), 1 NOT-MEASURED (check:dual-build-cjs-loads, needs every package dist; CI), 0 UNRUN; record /mnt/project-files/objectstack-seat2/34664-gates-ran.txt. lint test 216/216 files, 9124/9124; spec test 848/848 files, 27174 passed + 1 todo; lint + spec typecheck exit 0. Ablations: lint acknowledgedReason -> undefined => 4 red; spec readable:false refine vacuous => 1 red; both restored, git diff HEAD empty.",
      "line_budget": "n/a — no skills/** or ratcheted file touched",
      "deviations": "none; reviewer request not sent at create (seat hands off)",
      "files_changed": [
        ".changeset/34664-rollup-source-unreadable-reason.md",
        "content/docs/data-modeling/fields.mdx",
        "content/docs/deployment/validating-metadata.mdx",
        "content/docs/references/api/protocol.mdx",
        "content/docs/references/security/permission.mdx",
        "packages/lint/src/rule-explanations.ts",
        "packages/lint/src/validate-rollup-source-visibility.ts",
        "packages/lint/src/validate-rollup-source-visibility-acknowledged-34664.test.ts",
        "packages/spec/authorable-surface/security.json",
        "packages/spec/liveness/permission.json",
        "packages/spec/liveness/state-counts/permission.md",
        "packages/spec/src/security/permission.test.ts",
        "packages/spec/src/security/permission.zod.ts"
      ],
      "open_questions": ["Contract review owed (packages/spec/src, Metadata-protocol: added) at head 6b6146d0c4dfa00c67e63b635f2adada3b52cad2"],
      "security_findings": "none",
      "out_of_scope_findings": ["carrier: #34742 · the skill line and eval for rollupSourceUnreadableReason (skills/objectstack-data/rules/relationships.md)"]
    }
  9. objectstack-fleet commented on Nov 17, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-steve · session_01ADHkmPJxG4vBVaLCBWLcWJ

    Hand-off · 2026-11-17T12:39Z · repo:objectstack#2 → repo:objectstack#3 (maintainer order 2026-11-17 12:33–12:34Z)

  10. removed
    pm:dispatched
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:specpriority:p1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions