Skip to content

review follow-ups of PR #37591 #37613

Description

@objectstack-fleet

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Filing gate: ① (review follow-ups, one card per PR) · Source: fleet (Contract review record 7196156631 on PR #37591, nit N2)

What happens

PR #37591 (Part of #36029) adds a { systemPermission } arm to a book's audience. That arm is strict, but the older { permissionSet } arm is not. An audience written with both keys, { permissionSet: 'x', systemPermission: 'setup.access' }, therefore parses as the { permissionSet } arm, and systemPermission is dropped without a word. The author believes the book is gated on a capability, and it is gated on a permission set only.

  • Refuse the two-key shape. Expected: os lint (or os validate) refuses an audience naming both keys and says which one to keep. Alternatively, make the { permissionSet } arm strict under its own (narrowing) declaration, if a stored book with a stray key is shown not to exist.

Category ①: an authored value is accepted and silently means less than it says, on a permission surface.
Priority: p2. Nothing ships with the two-key shape today, and the new arm is days old.
Business reason: an admin manual gated by a mistyped audience opens to a wider or different group than its author intended.
Reader: the lane that holds packages/spec/src/system/book.zod.ts and packages/lint (seat 2 s2-data, after #36029's code PR lands).
Dedupe: book audience permissionSet systemPermission strict (open issues), 0 hits besides #36029.
Related: #36029, PR #37591.

Activity

  1. added
    bug
    priority:p2
    domain:spec
    on Nov 26, 2026
  2. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:data · domain:spec · Bug · priority:p2 · pm:queue · size S; rationale: review follow-ups of PR #37591. p2 as filed.

  3. added
    pm:queue
    on Nov 26, 2026
  4. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Added from the delta contract review of PR #37591 (record 7197921983, head 99447c4346) · 2026-11-26T16:40Z

    • Pin each package's docs to its manual (N4). The Setup and Studio manuals now claim their docs by name prefix (include: 'setup_*' / 'studio_*'). No gate holds a package's registered docs to that prefix: the docs/namespace-prefix lint runs in os build, Setup and Studio are built by tsup, and the new pins use fixture copies of the manuals. So a future doc named outside the prefix, or the shipped constant put back to '*', would turn no test red. Expected: one test that reads each package's shipped manual constant and its registered docs, and checks that every doc is claimed by that package's manual.
    • packages/spec/liveness/book.json (N5): the audience row's evidence and note were rewritten by feat(spec): a book audience can name a capability, so Setup and Studio docs open only for callers who can open those apps #37591, but its verifiedAt still reads 2026-09-27. The date bumped to 2026-11-26 is on the name row, whose evidence did not change. Expected: move the date to the audience row.
  5. objectstack-fleet commented on Nov 26, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Added from the contract review of PR #37663 (record 7200775826, the ADR-0046 amendment for #36029), next to N4 above: the authoring rule the amendment teaches, that a book gated by audience never claims docs by include: '*', is not enforced. A grep of packages/lint/src on main finds no rule reading a book's include against its audience. Expected: one lint rule that refuses a gated book whose include is the catch-all, with a pin per form.

  6. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Claim: PM loop round 1 · 2026-11-27T07:41Z
    Session: session_01L6bhgV6i8jfWwSXjpWJrjA
    Thread session: session_01L6bhgTbkZmKG1Moic2iU5K
    Account: os-sales
    Branch: claude/project-thread-mu5jxy
    Domain: domain:spec
    Seat: repo:objectstack#2
    Area: s2-data
    File surface: packages/lint (rules: a book audience naming both permissionSet and systemPermission; a package's registered docs held to its manual's name prefix; a book gated by audience never claiming docs by include: '*'), their pins, the liveness book.json row the card names, and packages/spec/src/system/book.zod.ts only if the lint route cannot reach the authored value.
    Container & model: M, mode:thread, model: default — no path-derived mandate, effort: high (reason: lint rules on a permission surface)
    Clause-②: no
    Metadata-protocol: none
    Responsibility: n/a — review follow-up card
    Thread-read: none
    Premise: holds — PR #37591 merged; { permissionSet } arm is not strict on main, so the two-key audience parses as it and drops systemPermission
    Serial constraints cleared: none

    The PR says Fixes #37613. A strict { permissionSet } arm would be a (narrowing) arm and Tier H; the thread says so in its report if it takes that route.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Claim amendment · 2026-11-27T09:41Z (claim 7212725896, PR #37870)

    • Route of item 1. The lint route cannot see the authored value: defineStack parses books at definition, and the non-strict { permissionSet } arm strips systemPermission before any rule runs. The thread took the schema route the card names as the alternative: the set arm refuses systemPermission (z.never), the { systemPermission } arm is strict with guidance, and the whole { permissionSet } arm is NOT made strict (stored rows are kept as written, and no proof exists that none carries a stray key).
    • Declarations. Clause-②: yes (narrowing) and Metadata-protocol: narrowed, with an ADR-0087 semantic migration entry, replace the claim's no / none. Tier H.
    • File surface, widened to: packages/spec/src/system/book.zod.ts and its generated book.mdx; the new lint rule book-gated-catch-all-include (validateBookAudienceClaims) with the CLI commands and the runtime publish gate; apps/setup and apps/studio (manual-claims-docs.test.ts each, their test script, tsconfig and vitest alias); the migration entry; the docs pages that list rules (four CLI transcripts, 83 → 84) and validating-metadata; and a DELIBERATE CORRECTION of feat(spec): a book audience can name a capability, so Setup and Studio docs open only for callers who can open those apps #37591's pending note .changeset/36029-book-audience-system-permission.md (one sentence).
    • Fixes #37613 stands.
  9. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgTbkZmKG1Moic2iU5K
    os-dev-report

    {
      "issue": 37613,
      "status": "done",
      "branch": "claude/project-thread-mu5jxy",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37870",
      "session": "session_01L6bhgTbkZmKG1Moic2iU5K",
      "premise_still_valid": true,
      "summary": "A book audience naming both permissionSet and systemPermission is refused at the parse. The set arm declares systemPermission as z.never, and the systemPermission arm is a strictObject with one-gate guidance. Schema, not lint, because defineStack parses books before any rule runs. New gating rule book-gated-catch-all-include refuses a gated book whose group claims by an all-star include, on CLI and on the runtime publish gate. N4 pins in setup and studio; N5 liveness date moved. Head dc85e540 is b9998850 plus a merge of main whose only conflict was the CLI transcripts rule count, resolved to 86.",
      "tests": "Local on 8143254075: spec system/migrations/shared/kernel 191 files 5601 passed; lint full suite 241 files 9749 passed (validate-book-audience-claims.test.ts 9/9); setup and studio 2/2 each. Ablations: spec refusing field removed -> book.test.ts 1 red; lint catch-all disabled -> 6 of 9 red; setup include set to * -> control-doc pin red; setup_overview renamed -> claim pin red. Each restored. After the merge: check:docs-transcript-drift green on a rebuilt lint dist (4 declared values equal the registry).",
      "gates": "CI on dc85e540: 60 check-runs success, every family green except Check Changeset, red only on the DELIBERATE CORRECTION of .changeset/36029-book-audience-system-permission.md (confirmed in seat ACCEPT 7215203264). Test Core (5/10) create-objectstack scaffold timeout and Test UI (13/16) StudioRoute history race: outside the diff (PR comment 7215769305), green on run 45977973062 attempt 2.",
      "dogfood_battery": "dc85e540745a89771114cb8810b27dcab6d9ee55 · os-verify-lock: VERDICT command-exit 0 · held the lock 2460s · Test Files 490 passed | 3 skipped (493) · Tests 4144 passed | 68 skipped (4212) · no failures. Command: pnpm --filter @objectstack/dogfood^... build, then pnpm --filter @objectstack/dogfood test, under the lock, no shard, no path.",
      "mcp_calls": "0 writes (reads only)",
      "api_writes": "all GitHub writes through scripts/pm/fleet-write: pr_create, issue_patch (PR body), comment x2 + comment_edit x1 on the PR, run_rerun_failed x2",
      "open_questions": [],
      "security_findings": "withheld",
      "out_of_scope_findings": [
        "class: c · reach: create-objectstack scaffold-current-dir-collision and console StudioRoute.metadataArea-28561 flow/f1 history assertion time out or race on loaded CI shards · evidence: PR comment 7215769305 · noted, not filed"
      ]
    }
  10. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Landed · 2026-11-27T12:36Z

    PR #37870 merged at 2026-11-27T12:35Z (approved by the maintainer) and closed this card: a book's audience is one gate, and a gated book cannot claim every doc with include: '*'. pm:dispatched is cleared. No follow-ups beyond the owner-seat item already handed on.

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

Metadata

Metadata

Assignees

Labels

area:databugdomain:specpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions