Skip to content

spec: a restriction profile cannot list the approval / approval_revise nodes a hosted Team engine runs, and allowCode is one boolean that also refuses sandboxed lifecycle hooks #31344

Closed

Description

@objectstack-fleet

repo:cloud#2 · os-zhuang · session_0123kRqqdpAJWYMgsgdAJX4G

维护者速读

Filing gate: ① a defect found by measurement. It was found by the cloud#3713 thread (seat 2 dispatch, 11-08), which implemented the publishing side. This is part of the cloud#3659 ruling A execution (「全部立卡并p1」).

Reader who acts: the domain:spec lane (RestrictionProfileSchema, os validate --target reader rules).

Dedupe: I searched approval_revise FlowNodeAction (0 open). #31239 is the closest. It is in flight on PR #31277 and covers parallel / try_catch and devPlugins only, so the approval pair is filed here instead of widening that PR.

Items

  1. Approval nodes. Let the profile admit approval and approval_revise, either by putting them in the FlowNodeAction set or by using the same container or allow-list mechanism fix(cli): os validate --target allows the ADR-0031 parallel / try_catch containers, and the restriction profile docblocks state the reader rules #31277 picks for parallel / try_catch. Then os validate --target against a Team environment accepts a flow that uses them.
  2. allowCode granularity. Decide whether a sandboxed lifecycle hook body counts as "code" for the reader. If it does not, split the dimension, for example allowCode versus allowSandboxedHooks, so a hosted profile can say what its kernel actually binds. If it does, document that hosted kernels binding sandboxed hooks is the gap, and file that against the runtime.

Acceptance

  • A spec test shows a profile with allowCode: false that admits approval nodes, and os validate --target passes a Team-shaped stack with an approval flow.
  • Item 2 lands as a schema change with a test, or as a written ruling in the schema docblock.
  • After this lands, cloud's profile (cloud#3713) lists the approval pair on Team. That is a cloud follow-up for the cloud seat.

Refs cloud#3713, cloud#3659, #31239

Activity

  1. added
    bugSomething isn't working
    priority:p1High: required for production / M2
    pm:queueReady for the PM dispatch loop
    domain:specDomain lane — seat card indexed by label:pm:seat
    pm:blockedBlocked by another issue/PR — body carries Blocked-by: #N
    and removed
    pm:queueReady for the PM dispatch loop
    on Nov 8, 2026
  2. objectstack-fleet commented on Nov 8, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: audit · p1 · domain:spec · blocked on decision #31354 · 2026-11-08T03:52Z

    ⛔ Not a claim.


    Generated by Claude Code

  3. objectstack-fleet commented on Nov 8, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#4 · marchtian · session_017ihL2eAG5J8aqAyPZif4BJ

    Unblocked · pm:blocked → pm:queue · 2026-11-08T04:15Z

    ⛔ Not a claim.

  4. added
    pm:queueReady for the PM dispatch loop
    and removed
    pm:blockedBlocked by another issue/PR — body carries Blocked-by: #N
    on Nov 8, 2026
  5. objectstack-fleet commented on Nov 8, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#4 · marchtian · session_017ihL2eAG5J8aqAyPZif4BJ

    Claim: PM loop round 2 · 2026-11-08T04:19Z
    Session: session_017ihL2f9i7baA5w5Ta9Ai5P (card thread; dispatched by seat session session_017ihL2eAG5J8aqAyPZif4BJ)
    Account: marchtian
    Branch: claude/project-thread-7zgbrf
    Worktree: the card thread's own container checkout
    Domain: domain:spec
    Seat: domain:spec#4
    Ruling-ref: decision #31354, the maintainer's 「同意」, record 6717120942 (item 1 = B2 derived vocabulary, item 2 = required allowSandboxedJs)
    File surface: packages/spec/src/system/restriction-profile.zod.ts (+ test), packages/cli/src/utils/restriction-profile.ts + restriction-profile.test.ts, regenerated schema references under content/docs/references/**, changesets
    Container & model: M, mode:thread, model: default tier, effort: default; independent Fable review of the spec diff before ACCEPT (the maintainer's standing spec rule)
    Clause-②: yes
    Metadata-protocol: none
    Responsibility: n/a — the profile vocabulary cannot express what a hosted kernel runs (measured on cloud#3713)
    Thread-read: 6717129354
    Premise: holds (approval pair absent from FlowNodeAction; allowCode the only code key); the dev re-measures on its base
    Serial constraints cleared: none — serial BEHIND #31239 / PR #31277 (claude/project-thread-0phzyp, domain:spec#1), same files; this branch builds on #31277's head and merges origin/main after it lands

  6. added
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Nov 8, 2026
  7. objectstack-fleet commented on Nov 8, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#4 · marchtian · session_017ihL2f9i7baA5w5Ta9Ai5P

    os-dev-report

    {
     "issue": 31344,
     "status": "done",
     "branch": "claude/project-thread-7zgbrf",
     "pr": "https://github.com/objectstack-ai/objectstack/pull/31410",
     "head": "8ef2c1ef",
     "session": "session_017ihL2f9i7baA5w5Ta9Ai5P",
     "premise_still_valid": true,
     "summary": "Ruling D (#31354) items 2 and 3 implemented. The spec exports RestrictionProfileNodeType = FlowNodeAction.options plus approval/approval_revise; allowedFlowNodeTypes uses it, and FlowNodeAction is unchanged. allowSandboxedJs is a new required boolean governing every L2 js body (hooks/actions/jobs), and allowCode is narrowed to in-process code. The os validate --target reader classifies hooks and jobs by body (body over handler), now reads script-action bodies (top-level and objects[].actions, bound echo deduped), judges jobs by schedule first, and judges the approval pair by the list. Premise re-measured on base: the approval pair is absent from FlowNodeAction and allowCode was the only code key.",
     "tests": "head 8ef2c1ef: cli unit tier 401/401 files, 5682 tests :: exit 0; spec full vitest 912/912 files, 27533 tests :: exit 0; spec typecheck :: exit 0; cli typecheck (tsc + check:test-typecheck) :: exit 0; targeted restriction-profile suites spec 41, cli 45 :: exit 0; eslint on 6 touched files :: exit 0. cli integration tier left to CI. No ablation: the flipped approval case asserted the opposite verdict on the old reader.",
     "gates": "dispatch-gates --commands at 1b583369 (same change set after merges), 108 families; --ran reconciliation: 107 run, 1 NOT MEASURED, 0 unrun. 5 families first exited 3 for a missing build (spec check:skill-examples, check:dual-build-cjs-loads, check:i18n, check:i18n-coverage, check:i18n-walk-parity) and re-ran :: exit 0 after building the prerequisites. NOT MEASURED: check-plugin-teardown-shape --self-test :: exit 3 (fixture pinned to 621a4876, unreachable on this shallow clone; no plugin is touched; CI runs it). check:generated --fix after each merge: nothing stale on the final head. CI check-runs: in_progress at report time.",
     "dogfood_battery": "n/a — no ! in the title and no (narrowing) arm (schema unshipped)",
     "line_budget": "14 files, +608 / -96 vs origin/main (hand-written: spec zod + test, cli reader + 2 tests, pin, changeset; the rest generated)",
     "files_changed": [
      "packages/spec/src/system/restriction-profile.zod.ts",
      "packages/spec/src/system/restriction-profile.test.ts",
      "packages/spec/src/type-alias-convention.pin.test.ts",
      "packages/cli/src/utils/restriction-profile.ts",
      "packages/cli/src/utils/restriction-profile.test.ts",
      "packages/cli/test/validate-target-restriction-profile.test.ts",
      ".changeset/31344-restriction-profile-approval-pair-sandboxed-js.md",
      "generated: content/docs/references/index.mdx, content/docs/references/system/restriction-profile.mdx, packages/spec/{api-surface,authorable-surface,declaration-map,export-origins,json-schema.manifest}/system.json"
     ],
     "deviations": [
      "Declarations corrected from the claim: Metadata-protocol none -> added (the profile is on authorable-surface/system.json and #31156 declared it added); Clause-② yes -> yes (widening). The required key narrows nothing released because RestrictionProfileSchema is unshipped (npm 18.3.0, its changeset 31156 still pending), so the title carries no !. spec minor, cli patch, as ordered.",
      "One extra commit beyond the ruled scope wording: the reader judges an action body only on type script, and skips a hook with neither body nor handler. Both are Fable should-fix items that match runtime binding.",
      "PR #31277 landed as a squash; merging origin/main conflicted in all three files. Resolved to this branch's side, and the content is byte-identical to the pre-merge head."
     ],
     "fable_review": "PASS — comment 6718214164 on PR #31410 (round 1 PASS with 0 must-fix and 2 should-fix applied; delta re-review PASS, 3 nits applied)",
     "existing_profile_callers": "RestrictionProfileSchema / allowCode producers in packages/**, examples/**: spec restriction-profile.test.ts, cli restriction-profile.test.ts, cli test/validate-target-restriction-profile.test.ts — all updated to carry allowSandboxedJs. No example or fixture elsewhere builds a profile.",
     "open_questions": [],
     "out_of_scope_findings": [
      "carrier: none · noted, not filed: a type script action with no body whose target names a function is not judged per item. The function it names is already refused under allowCode false through the functions key. Unchanged, outside the ruling.",
      "carrier: cloud · cloud#3713 Team profile must list approval/approval_revise and write allowCode false, allowSandboxedJs true once this lands (ruling's cloud follow-up)."
     ],
     "mcp_calls": "0",
     "api_writes": "2 — relay pr_create (PR #31410, assignee marchtian) via fleet-write run 42454637045; post-stamped comment 6718214164 on PR #31410 via relay run 42454708507. This report is the third.",
     "security_findings": "none"
    }

    Generated by Claude Code

  8. objectstack-fleet commented on Nov 8, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#4 · marchtian · session_017ihL2eAG5J8aqAyPZif4BJ

    ACCEPT → PR #31410 comment 6718340279 · head 8ef2c1ef5 · 2026-11-08T06:41Z

    • Contract review PASS at CONTRACT_REVIEW_TIER on this head (6718340279): ruling [Decision] Restriction profile vocabulary: which flow nodes a hosted environment can list (ADR-0031 containers, the Team approval pair), and whether allowCode splits off sandboxed lifecycle hooks #31354 items 2–3 met as recorded in 6717120942; 0 must-fix, 0 should-fix, 1 prose nit accepted (restriction-profile.zod.ts:126 "no body" also needs a handler to be in-process code). The developer's independent Fable pass (6718214164) and its delta are on record; os-dev-report 6718278259.
    • Declarations corrected by the dev and confirmed by the review: Clause-②: yes (widening), Metadata-protocol: added (the claim's none is superseded: relative to released 18.3.0 the whole RestrictionProfile type is new). Changesets @objectstack/spec minor + @objectstack/cli patch; no !, because .changeset/31156-restriction-profile-schema.md is still pending.
    • Path face: packages/spec/src/**, packages/cli/**, generated packages/spec/{api-surface,authorable-surface,declaration-map,export-origins,json-schema.manifest}/**, content/docs/references/**; no governed path; 608 + 96 lines ⇒ Tier S. Lands on green CI through the merge queue.
    • Accepted deviation: the dev's gate run is 107/108, plugin-teardown self-test NOT MEASURED (shallow clone); CI is the reading of record.
    • Downstream: cloud#3713 / cloud#3732 can list the approval pair and write allowCode: false, allowSandboxedJs: true once this ships.
  9. objectstack-fleet commented on Nov 8, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#4 · marchtian · session_017ihL2eAG5J8aqAyPZif4BJ

    Landed · domain:spec#4 · 2026-11-08T07:27Z

    reading value
    PR #31410 merged 2026-11-08T07:27:06Z through the queue, merge commit acfc86c4513d7977dea26071ecbeda6cfb84adf5, reviewed head 8ef2c1ef5 (contract review PASS 6718340279 + ACCEPT on that head)
    card closed completed by Fixes

    State: pm:dispatched removed. Downstream: cloud#3713 / cloud#3732 may now list the approval pair and write allowCode: false, allowSandboxedJs: true (ruling #31354, record 6717120942); the cloud seat owns that follow-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdomain:specDomain lane — seat card indexed by label:pm:seatpriority:p1High: required for production / M2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions