Skip to content

feat(cli): name enterprise and cloud capabilities no provider enforces in os validate, os verify and os serve - #35168

Merged
objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/issue-34726-enterprise-capability-finding
Nov 18, 2026
Merged

objectstack-fleet[bot] merged 7 commits into
mainfrom
claude/issue-34726-enterprise-capability-finding

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #34726

Clause-②: yes (widening)
Metadata-protocol: none

维护者速读

  • 改了什么:os verify 现在会跑 os validate 已有的「能力提供方检查」并以提示(advisory)形式输出(--json 新增 capabilities 字段);os validate / os build 增加「已安装但没接进 plugins[]」的检查;企业版能力的提示写明后果(层级可见范围在开源版按「只看自己的记录」处理);os serve 启动时对没有提供方的企业版/云端能力打印一行提示。
  • 为什么改:声明了 requires: ['hierarchy-security'] 却没有企业版提供方时,os verify 全绿、os serve 无声、运行时静默退回 owner-only,开发者无从得知;按维护者指示「os verify 点名企业版能力」。
  • 风险与回滚:只增加提示;默认退出码不变(os verify 对云端能力仍为 0,与 os validate 的 exit 1 不一致,见 Acceptance notes)。唯一例外是 os validate --strict:它本来就把所有警告当失败,所以「装了企业包但没接进 plugins[]」(或包装上了却加载失败)的应用,在 --strict 下会从 exit 0 变成 exit 1;不加 --strict 和 os build 不受影响;运行时行为不变,仍 fail-closed;回滚即 revert 本 PR。
  • 先看:packages/cli/src/utils/capability-preflight.ts(preflightProviderWiring 与企业版后果文案)、packages/cli/src/commands/verify.ts(runCapabilityAdvisories)、packages/cli/src/commands/serve.ts(启动提示,能力解析循环之前)。
  • 两分钟验证:pnpm --filter @objectstack/cli exec vitest run --project integration test/capability-edition-advisory.test.ts,预期 2 个用例通过:开源版应用在 validate 与 verify --json 中都出现 hierarchy-security 提示,接上提供方后两边都没有。
  • 需要你做的:无,席位落地。

What changes

The capability registry (PLATFORM_CAPABILITY_PROVIDERS) already tags each requires token with an edition, and os validate already classified declared tokens against it (packages/cli/src/utils/capability-preflight.ts). This PR extends that one classifier; no new lint rule, no spec change.

  1. os verify surfaces the capability-provider check (stage 1, after the author-time rules). Every finding os validate raises for a declared token is reported as an advisory: a line on the text face, and capabilities: [{ token, message, validate }] on the --json report, where validate is error when os validate refuses the stack over it and warning when it only reports it. [] when there is none. The exit code is unchanged for every token, cloud tokens included.
  2. Wiring check (preflightProviderWiring), in os validate, os build and through (1) os verify. An enterprise-edition token whose package resolves but which no plugins[] entry provides is a warning. Nothing mounts an enterprise provider from requires, so a resolvable package alone enforces nothing. A plugins[] entry provides the token when it is an instance of a class the package exports (or carries that name), the exact identity match serve uses (providesCapability), or a string entry naming the package. A package that resolves but cannot be loaded is reported as unloadable, never read as wired. Which tokens are enterprise is the registry's edition tag.
  3. The enterprise message names the consequence. For example: "Only the enterprise edition enforces it: without a wired provider, as on the open edition, the hierarchy scopes (own_and_reports, unit, unit_and_below) behave as owner-only, and no log line says so." The remedy reads "Install PKG and add its plugin to plugins[], or remove the token from requires", in place of the old pnpm add PKG. ENTERPRISE_ABSENCE_CONSEQUENCE only sharpens that sentence; a future enterprise token with no row gets a generic consequence, and a test pins every row to an enterprise registry token.
  4. os serve start-up line. A declared token with no resolver row and no tier block (today hierarchy-security, ai-seat, governance, audit-compliance, access-policy-console) used to pass the capability loop in silence. It now prints the same sentence once, as a warning, when nothing in plugins[] provides it. The boot is unchanged. ai / ai-studio already fail the boot through their tier block with the edition-aware message.
  5. Docs. The permission pages that describe the hierarchy scopes (index, permission-sets, permissions-matrix, positions, administrator-guide) now say the enterprise edition enforces them and the open edition treats them as owner-only. deployment/cli.mdx documents verify's new stage and the capabilities field.

Runtime behaviour is unchanged: SharingService.resolveOwnerScopeIds still fails closed to owner-only without the resolver.

Tests

  • packages/cli/test/capability-preflight.test.ts (unit): a battery derived from the registry, one pair of cases per non-open token (7 today: hierarchy-security enterprise; ai, ai-studio, ai-seat, governance, audit-compliance, access-policy-console cloud) with a floor so an emptied registry cannot pass vacuously. No provider gives exactly one finding naming the token. Provider present gives none, except the packageless cloud tiers, which have no provider to be present. Wiring cases: plugins empty, unrelated plugin only, exported class present, string entry (never loads), unloadable, unresolved (not this check's finding), per-package attribution, open/cloud tokens never reach it. The consequence rows are pinned to enterprise tokens.
  • packages/cli/test/capability-edition-advisory.test.ts (integration, spawned source CLI): the open-edition stack (requires: ['hierarchy-security'] and a unit_and_below grant) gets the finding in os validate --json warnings and in os verify --json capabilities, the same sentence, both exit 0. The control, the same stack with a package of the provider's name declared and its exported plugin class in plugins[], gets none from either door.
  • Ledgers updated: normalized-call-sites.test.ts classifies verify's top-level requires read (handed to the same top-level-else-bodies rule); validate-build-gate-parity.test.ts lists preflightProviderWiring as a shared gate (wired into both validate.ts and compile.ts).
Readings (local, shared box, under the verify lock)
  • Final head 528e8c1 (merge of origin/main a6cf988, which carries the merged fix(spec,metadata-protocol)!: retire the seed modes insert and replace, which inserted every record again on each replay #34791), after pnpm install --frozen-lockfile and a rebuild of @objectstack/cli... plus pnpm --filter @objectstack/cli typecheck (VERDICT command-exit 0):
    • pnpm --filter @objectstack/cli exec vitest run --project integration --maxWorkers=2 test/capability-edition-advisory.test.ts: Test Files 1 passed (1) · Tests 2 passed (2), duration 40.83 s.
    • pnpm --filter @objectstack/cli exec vitest run --project unit --maxWorkers=2: Test Files 428 passed (428) · Tests 6122 passed (6122).
  • Earlier: the first full unit run, at 40f0658, found the two ledger reds above, fixed in 33fdceb (unit project at 33fdceb: 428/428, 6122/6122).
  • ... --project unit test/normalized-call-sites.test.ts test/validate-build-gate-parity.test.ts test/capability-preflight.test.ts && pnpm --filter @objectstack/cli typecheck at 33fdceb: Test Files 3 passed (3) · Tests 97 passed (97), typecheck clean, VERDICT command-exit 0.
  • integration project as a whole: declared to CI.
Ablations (each: committed fix, mutation through scripts/ablation-replace.mjs, restore proven by HEAD blob hash)
  • A. preflightProviderWiring's verdict forced to "wired" (return undefined; // ABLATION-34726-A): anchor 1 to 0, blob e346e1a9 to 94041a75; capability-preflight.test.ts went red, Tests 4 failed | 43 passed (47) (the unwired, unrelated-plugin, per-package and owner-only cases). Restored blob e346e1a9 equals HEAD.
  • B. capabilities dropped from verify's --json report: anchor 1 to 0, blob 0250b1f3 to 77f996e0; capability-edition-advisory.test.ts went red, Tests 2 failed (2) ("expected undefined to deeply equal ..."). Restored blob 0250b1f3 equals HEAD, git diff HEAD empty.

Acceptance notes

  • validate/verify exit-code parity gap, the 6 cloud tokens (ai, ai-studio, ai-seat, governance, audit-compliance, access-policy-console). os validate refuses such a stack with exit 1; os verify now reports the same sentence under capabilities with validate: 'error' but still exits 0, by this card's ruling (advisory only). Whether os verify should match os validate's exit 1 is a separate decision: filed cli: should os verify fail like os validate on cloud capability tokens with no provider (exit parity) #35170.
  • Runtime silence stays. The sharing layer's owner-only fallback (SharingService.resolveOwnerScopeIds, if (!resolver) return [me];) still logs nothing; the CLI now says it at start-up for os serve, but a host that boots without the CLI (cloud's objectos-runtime) gets no line from this change. Filed runtime: the owner-only fallback for a missing hierarchy-security provider logs nothing outside the CLI #35172.
  • Wiring heuristic. A plugins[] instance of ANY class the provider package exports counts as wired. @objectstack/security-enterprise exports several plugins (SecurityEnterprisePlugin registers the hierarchy resolver; others such as the AI-seat plugin do not), so wiring only an unrelated plugin from that package silences the warning. The registry carries no plugin identity per token; tightening this needs a registry field (spec, out of this card's surface). Filed capabilities: the registry has no per-token provider identity, so the CLI wiring check matches any security-enterprise class #35173.
  • The wiring check loads the provider package (only for a declared enterprise token whose package resolves), through serve's host importer. os serve already loads it on boot; os validate / os build now do too in that one case.
  • os build gets the wiring warning as well: the closed gate-parity ledger requires a gate in validate.ts to be in compile.ts too or recorded as a validate-only gap; wiring it in both was the smaller change.
  • Skills follow-up: the skills/** text describing hierarchy scopes (which edition enforces them, and the new verify capabilities field) is follow-up card skills: hierarchy-scope rows and os verify output do not name the new capability advisory and the capabilities field #35171; skills/** is not edited here.
  • Gates: node scripts/pm/dispatch-gates.mjs --repo objectstack-ai/objectstack --commands derived 106 families at 528e8c1; all 106 exit 0 (each exit code captured before any pipe). --ran reconciliation: "106 derived famil(ies) accounted for — 106 run, 0 NOT-MEASURED". The other CI families (artifact rosters, wide-population, type-check lanes, Build Core, dogfood) are CI's.

Verification

Manual readings at 45f1303 (source CLI, bin/run-dev.js), fixtures in a temp dir:

  • open stack: os validate --json exit 0, one warnings entry for hierarchy-security naming owner-only; os verify --json exit 0, capabilities holds the same sentence, hardFailures 0.
  • same stack, provider package installed but plugins[] empty: os validate --json exit 0 with the unwired warning; os verify --json the same under capabilities.
  • provider wired: no capability finding from either door.
  • requires: ['governance', 'hierarchy-security']: os verify text face prints both, the cloud one suffixed "os validate refuses this stack.", exit 0; os serve --dev prints both lines at start-up and boots (discovery 200); with the provider wired, os serve prints neither.

Generated by Claude Code

… validate, verify and serve

os verify now runs the capability provider check os validate runs and
reports it as advisories (capabilities on --json). os validate adds the
wiring check: an enterprise token whose package resolves but no plugins[]
entry provides. The enterprise message names the owner-only consequence,
and os serve says it once at start-up.

Claude-Session: https://claude.ai/code/session_01JQwxbaX2qDxUq9sF93EqqL
Co-authored-by: Claude <noreply@anthropic.com>
…token and through both doors

Claude-Session: https://claude.ai/code/session_01JQwxbaX2qDxUq9sF93EqqL
Co-authored-by: Claude <noreply@anthropic.com>
…ocument verify's capability advisories

Claude-Session: https://claude.ai/code/session_01JQwxbaX2qDxUq9sF93EqqL
Co-authored-by: Claude <noreply@anthropic.com>
…reads in the call-site ledgers

Claude-Session: https://claude.ai/code/session_01JQwxbaX2qDxUq9sF93EqqL
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/l documentation Improvements or additions to documentation tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 18, 2026
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/cli, touching 15 documentable anchor(s).

20 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: node scripts/docs-audit/affected-docs.mjs --json 4b1eb0eab7ac41708a6775d1e6116ac4c038a5a3.

⛔ 8 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails.

What this run could not see
  • 2 anchor(s) matched too much of the corpus to be a work list: os serve (command, 51 pages), os validate (command, 92 pages)
  • 7 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 123 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 39 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 4b1eb0eab7ac41708a6775d1e6116ac4c038a5a3 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 064d8c5c1767ad02fd4974b68e6fdc2e6e2928f9 — the merge of head d04836d59af212b7ed07c5f3f50949f15c468212 into base 4b1eb0eab7ac41708a6775d1e6116ac4c038a5a3, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 064d8c5c1767ad02fd4974b68e6fdc2e6e2928f9 && git checkout 064d8c5c1767ad02fd4974b68e6fdc2e6e2928f9
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 4b1eb0eab7ac41708a6775d1e6116ac4c038a5a3 d04836d59af212b7ed07c5f3f50949f15c468212 && git checkout -B drift-repro 4b1eb0eab7ac41708a6775d1e6116ac4c038a5a3 && git merge --no-ff d04836d59af212b7ed07c5f3f50949f15c468212

node scripts/docs-audit/affected-docs.mjs --json 4b1eb0eab7ac41708a6775d1e6116ac4c038a5a3

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 4b1eb0eab7ac41708a6775d1e6116ac4c038a5a3 → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXr9wLAH24MEgxaLud

席位核对

L1 full · REWORK (one declaration line) · Head-sha: 528e8c162b401a1e20bcb6114d00d16a4b45b4aa · card #34726 (Fixes #34726) · read 2026-11-18T09:44Z

Net diff against merge base a6cf988eb3: 16 files, +715 / -20. Not governed. The order is claim 6971821177 as corrected by Premise corrected 6972083658 (route A: CLI only, no lint or spec change). CI was still running at this read: no job had failed yet, and Test Core, Build Core and several lint lanes were in progress. The fix below moves the head anyway, so I re-check gates at the new head.

Must fix

  • M1. The changeset and the PR body must declare Clause-②: yes (widening), not Clause-②: no. This answers the dev's own question.
    • os verify --json is a documented machine face. deployment/cli.mdx lists its report keys, and this PR adds capabilities to that list. A new key in a documented CLI --json document is an additive change to a published contract.
    • This repository has declared it that way before, in packages/cli/CHANGELOG.md:
      • os verify --dashboard-windows, whose --json gains dashboardWindows: Clause-②: yes.
      • os migrate plan, whose --json gains a schemaSyncIndexes entry: "Clause-②: yes (widening) — additive CLI …".
    • Nothing accepted before is refused, so the arm is (widening).
    • Keep Metadata-protocol: none, because what an author can write is unchanged. Keep the level at patch, because AGENTS.md says a non-protocol change, widening or breaking, ships patch.
    • Consequence: with Clause-②: yes, the PR owes L2 at TIER_DEFAULT (contract-review.md, "仅凭 Clause-②: yes 申报而欠").
    • The new os validate --json / os build warnings entries and os serve's start-up line keep their existing shapes, so they add nothing further to this.

Should fix (seat-side)

  • S1. The wiring heuristic's false negative has no carrier. Any class @objectstack/security-enterprise exports counts as wired, so AiSeatPlugin alone silences the hierarchy-security warning. The dev report lists this as "carrier: none". The tightening needs a per-token plugin identity on the registry row, which is a spec field. File it as a card, or record on os validate / os verify name Enterprise-only vocabulary (hierarchy scopes) on Community instead of letting it fail closed silently #34726 why it is not worth one.
  • S2. File the exit-code parity question before landing. For the 6 cloud tokens, os validate exits 1 while os verify reports validate: 'error' and exits 0. The PR says the seat files this; it is not yet filed.

Checked, holds

  • Against the card's acceptance, as corrected.
    • (1) The integration test spawns the source CLI against an open-edition stack with requires: ['hierarchy-security'] and a unit_and_below grant. The same sentence appears in os validate --json warnings and in os verify --json capabilities. The wired control gets nothing from either. Ablation B (dropping capabilities) turned both cases red.
    • (2) The unit battery is derived from PLATFORM_CAPABILITY_PROVIDERS: one pair per non-open token, 7 today, with a floor. Ablation A (wiring forced to "wired") turned 4 cases red.
    • (3) "The skills and docs … say which edition enforces them": this PR covers the docs, and the skills half already holds on main. skills/objectstack-data/SKILL.md L414-419 says the hierarchy-relative three "need the paid @objectstack/security-enterprise plugin, fail closed to own without it". So Fixes is right, and the dev's skills follow-up (verify's new field) is optional.
    • The card's literal case (a scope with nothing declared) is already refused by defineStack and the save door, as the premise correction measured.
  • Registry-driven. Which tokens get a finding comes only from the edition tag. ENTERPRISE_ABSENCE_CONSEQUENCE only sharpens the sentence, and a test pins each of its keys to an enterprise registry row. There is no edition upsell wording, as triage asked.
  • preflightProviderWiring.
    • It considers only tokens with status: 'ok', edition: 'enterprise' and a package. It looks up the verdict once per package.
    • A string plugins[] entry naming the package counts as wired without loading it. Otherwise it loads the module through serve's host importer and matches exported function names with providesCapability, the identity rule serve uses.
    • A load failure is reported as unloadable, never read as wired.
    • Top-level requires takes precedence over package bodies, the same rule as preflightDeclaredCapabilities.
    • It is wired into validate.ts and compile.ts, which the closed gate-parity ledger requires, and into verify through judgeDeclaredCapabilities.
  • os verify.
    • runCapabilityAdvisories runs after runAuthorTimeStage, so a refused stack still exits there, unchanged.
    • Errors map to validate: 'error' and warnings to 'warning'. The text face suffixes the error case with "os validate refuses this stack.".
    • The exit code reads only hardFailures, which is unchanged.
  • os serve.
    • The start-up line covers only declared tokens with no resolver row, no tier block, and membership in PLATFORM_CAPABILITY_TOKENS. It is a warning, the boot is unchanged, and the runtime still fails closed.
    • I checked the cloud repository's app configs (apps/*/objectstack.config.ts). The only one that declares hierarchy-security is ee-authz-showcase, which has plugins: [new SecurityEnterprisePlugin()], so it prints nothing. No cloud host declares a cloud-tier token at top level.
  • Docs, read sentence by sentence.
    • permission-sets.mdx's new paragraph matches the code: the token is declared, the plugin is wired into plugins[], and validate, verify (capabilities) and serve each name it.
    • The index, permissions-matrix, positions and administrator-guide lines all say enterprise-enforced and owner-only on the open edition. "The three hierarchy scopes in between" is correct, since own and org are open.
    • cli.mdx takes the capability-provider check out of the "stays os validate's" list, adds the advisory paragraph (exit status never changed, cloud tokens included), and adds capabilities to the report keys with its three fields and [].
  • Changeset (this PR's own file, @objectstack/cli patch), read sentence by sentence. All four bullets hold against the diff. M1 is the only change it needs. No content/docs/releases/ path is touched, and no changeset already on main is edited.
  • Merges cleanly. Main's base is a6cf988eb3, which already includes the merged fix(spec,metadata-protocol)!: retire the seed modes insert and replace, which inserted every record again on each replay #34791 that the claim named as a serial constraint.

Nits (no change asked)

  • serve.ts's comment says the line prints "only when nothing in plugins[] provides it". That holds for enterprise tokens. A cloud-tier token is printed whatever plugins[] holds, the same as os validate refuses it whatever plugins[] holds.
  • os validate and os build now import the provider package for a declared, resolvable enterprise token, so the module's top-level code runs at build time. The PR's Acceptance notes say this.

Still owed

  • M1 at a new head, then my delta re-read, with gates read green at that head.
  • L2 at TIER_DEFAULT, which the Clause-②: yes declaration triggers.

…pabilities key

`os verify --json` gains the documented `capabilities` key, an additive
change to a documented CLI JSON contract; nothing accepted before is
refused. Metadata-protocol stays none and the level stays patch.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JQwxbaX2qDxUq9sF93EqqL
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbaX2qDxUq9sF93EqqL

Contract-review-claim: session_01JQwxbaX2qDxUq9sF93EqqL · head 18ce97f82a · 2026-11-18T09:57Z (TIER_DEFAULT, owed by the Clause-②: yes (widening) declaration, L1 M1 6974851173)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXr9wLAH24MEgxaLud

席位核对

L1 delta · ACCEPT · Head-sha: 18ce97f82ac3ac7d6f9c1d3ffbd5ec2eb2c867b0 · card #34726 · read 2026-11-18T10:19Z

I read the delta only, from 528e8c16 (REWORK 6974851173) to this head.

Not mine, still owed before landing

  • L2 at TIER_DEFAULT (Clause-②: yes alone): claim 6975141986, with a verdict at this head.
  • Landing after that, through the seat.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbaX2qDxUq9sF93EqqL

Contract review

Served-tier: TIER_DEFAULT
Head-sha: 18ce97f82ac3ac7d6f9c1d3ffbd5ec2eb2c867b0
Local-runs: none

Face: declaration (Clause-②: yes (widening) in the PR body and the changeset; no packages/spec/src/** path and no governed path in the 16-file list). Inputs: card #34726 body and all 8 comments (triage 6943307381, 6969719517, 6975034433; claim 6971821177; premise correction 6972083658; os-dev-reports 6974751800 and 6975114933), PR #35168 body, its 4 comments (docs drift 6974755240, L1 6974851173, review claim 6975141986) and its file list, the net diff from merge base a6cf988eb3 to the head (16 files, +715 / -20), and the head's check-runs. Read-only git on the fetched head; nothing checked out, built or run.

① Derived judgments

  • os verify --json gains capabilities (verify.ts L515): an array of token, message, validate (error or warning), present and [] when nothing is found. Additive key on a documented machine face, documented in deployment/cli.mdx (report keys list). Pinned by capability-edition-advisory.test.ts (open stack: one entry; wired control: []). Right, a widening.
  • os verify exit status: unchanged. runCapabilityAdvisories runs after runAuthorTimeStage, and the exit still reads only hardFailures (L536). A stack refused at stage 1 still exits there. Right.
  • os verify text face: a new step line and one warning line per finding, with the error case suffixed "os validate refuses this stack.". Prose, not a contract. Right.
  • os validate (both faces) and os build, warnings: new entries from preflightProviderWiring, in the existing { token, message } shape (validate.ts L1045-1054, compile.ts L1033-1042). The shape stays inside the existing accept set. os build has no flag that turns warnings into a failure (--strict-body does not read this list). Right for the default faces and for os build.
  • os validate --strict: a new exit-1 path, not declared. Wrong, see M1. The new wiring findings land in capProviderWarnings, which goes into warnings (L1314-1316) and counts in strictFailing (L1369; the comment at L1340-1345 says capability advisories are counted). One case: a stack declares requires: ['hierarchy-security'], @objectstack/security-enterprise resolves, and no plugins[] entry is recognised as coming from it, or the package resolves but throws on import (unloadable). Before this PR that stack produced no capability warning, so os validate --strict and os validate --json --strict exited 0. Now both exit 1. The PR body's risk line says the opposite: 「只增加提示,不改任何退出码」. The changeset states only os verify's exit status and says nothing about --strict.
  • Enterprise remedy text (pnpm add PKG becomes "Install PKG and add its plugin to plugins[]", plus the consequence sentence): message prose of an existing finding. git grep at the head finds no doc or skill that quotes the old enterprise wording, and the open-token Run pnpm add wording at capability-preflight.ts L140 is untouched. Right.
  • os serve start-up line: a console.warn for declared, registry-known tokens with no resolver row and no tier block. The boot and the runtime fail-closed are unchanged. Right (nits N1 and N2).
  • TypeScript surface: ENTERPRISE_ABSENCE_CONSEQUENCE, enterpriseAbsenceConsequence, preflightProviderWiring, makeProviderModuleLoader, ProviderModuleLoader, CapabilityAdvisory, judgeDeclaredCapabilities, the optional DeclaredCapabilityClassification.wiring, and VerifyCapabilityAdvisory. None is reachable from @objectstack/cli's exports map (., ./console, ./hook-body). src/index.ts re-exports neither utils/capability-preflight nor the verify command. They are shipped bytes, not a published accept set (contract-review.md). Right, no Clause-② change from them.
  • Dependencies: the new imports @objectstack/core (providesCapability, capability-providers.ts L268) and @objectstack/types/node (createHostImporter L1432, packageNameFromSpecifier L233; ./node export present) are existing workspace:* dependencies. package.json is unchanged. Right.
  • Spec / metadata: no packages/spec path. What an author can write is unchanged. Right.

② Semver level

  • One changeset, .changeset/34726-enterprise-capability-advisory.md, '@objectstack/cli': patch. Its first lines are Clause-②: yes (widening) and Metadata-protocol: none, the same pair as the PR body. AGENTS.md (Post-Task Checklist step 3) says a non-protocol change ships patch, so the level is right. Check Changeset concluded success on this head.
  • Clause-②: yes (widening) holds for the capabilities key. The precedent is dashboardWindows on os verify --json, declared Clause-②: yes in packages/cli/CHANGELOG.md.
  • The changeset does not match what the diff publishes on one axis: M1. This repository's precedents for a new os validate --strict failure both say so in the changeset. In packages/cli/CHANGELOG.md at this head, entry 7a1faf1 has a "What a CI job sees: objectstack validate --strict … now exit 1" paragraph (L13639), declared yes (widening) (L13641). The per-package rule entry carries "BREAKING — os validate --strict can now fail a project it passed before" (L14975). This changeset has neither.

③ Boundary flags

Implemented-by: claude/issue-34726-enterprise-capability-finding
Reviewed-by: session_01JQwxbaX2qDxUq9sF93EqqL

VERDICT: FAIL

…ired enterprise capability

The new enterprise wiring warning rides the warnings list --strict
counts, so os validate --strict (both faces) now exits 1 on a stack it
passed before. Without --strict, and in os build, the exit is unchanged.

Claude-Session: https://claude.ai/code/session_01JQwxbaX2qDxUq9sF93EqqL
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbaX2qDxUq9sF93EqqL

Contract-review-claim: session_01JQwxbaX2qDxUq9sF93EqqL · head d04836d59a · 2026-11-18T10:36Z (TIER_DEFAULT delta of FAIL 6975671274, M1)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbaX2qDxUq9sF93EqqL

Contract review

Served-tier: TIER_DEFAULT
Head-sha: d04836d59af212b7ed07c5f3f50949f15c468212
Local-runs: none

Face: declaration. This is a delta record over the FAIL record 6975671274 at 18ce97f82ac3ac7d6f9c1d3ffbd5ec2eb2c867b0. The PR body and the changeset both declare Clause-②: yes (widening). The 16-file list has no packages/spec/src/** path and no governed path.

Inputs:

I used read-only git on the fetched head. Nothing was checked out, built or run.

What stands. The delta touches no code, test or doc file. Every judgment in 6975671274 that is not M1 stands unchanged and is not repeated here: ① for os verify (capabilities, exit status, text face), for the default faces of os validate and os build, for the remedy text, os serve, the TypeScript surface, the dependencies and the spec; ② for the level; ③ for the dev flags, N1, N2, SQL push-down and the author.

① Derived judgments

  • The os validate --strict exit-1 path is now declared. Right. The new changeset bullet says that os validate --strict and os validate --json --strict now exit 1 for a stack whose enterprise capability package resolves but is not wired into plugins[], or resolves but fails to load. It also says that without --strict, and in os build, the exit status is unchanged. I checked this against the code at this head:
    • validate.ts L1045-1054: preflightProviderWiring findings, in both states unwired and unloadable, are folded into capProviderWarnings.
    • L1315-1316: those warnings are pushed onto warnings.
    • L1369: strictFailing = warnings.length - infoFindings. Only registry info findings are excluded, so the capability warnings count.
    • Both faces gate on strictFailing: the JSON face through the exit-code argument at L1440, and the text face at L1476.
    • capability-preflight.ts: preflightProviderWiring reaches its judgment only for a token with status: 'ok' (its package resolves), edition: 'enterprise' and a provider package. unloadable is the case where the loader throws for such a package. So "resolves but is not wired" and "resolves but fails to load" are exactly the two wiring states.
    • Before this PR such a stack raised no capability warning, because an ok status produced none. Its --strict exit was therefore 0, as the bullet implies.
  • os build is unchanged. Right. Its flags at this head (compile.ts L113 onward) are output, json, strict-body, runtime-bundle, no-runtime-bundle and update-access-matrix.
    • --strict-body (L404) reads lowering.bodylessCallables and never reads the warnings list.
    • compile.ts L1033-1042 adds the same wiring findings to capProviderWarnings. They are printed, or carried in the --json warnings, and no exit path reads them.
    • So "which has no flag that fails on warnings" is accurate.
  • The PR body risk line is corrected. Right. It now reads that the default exit codes are unchanged, with one exception: under os validate --strict a stack whose enterprise package is installed but not wired into plugins[], or installed but fails to load, goes from exit 0 to exit 1. Without --strict, and in os build, nothing changes. This matches the code above and the changeset. The false 「不改任何退出码」 is gone.
  • The remedy M1 asked for is not in the new bullet itself. It is the next bullet of the same changeset: "Install the package and add its plugin to plugins[], or remove the token from requires". A reader of the CHANGELOG entry gets both the exit-1 path and the fix. This is not a finding.
  • Accept set. The delta adds no new accept-set or public-surface change. It declares one that 6975671274 found in the code at 18ce97f8, and the code is unchanged since then.

② Semver level

  • '@objectstack/cli': patch, Clause-②: yes (widening) and Metadata-protocol: none are unchanged in both the changeset and the PR body. Check Changeset concluded success on this head.
  • The arm. I judged the seat's thread ruling on its merits. The ruling: --strict's contract, "every warning fails", is unchanged, and the warning set is not a promised contract. I agree, and Clause-②: yes (widening) stands. This is not BREAKING. The evidence is the published text at this head:
    • deployment/cli.mdx L984 defines --strict as "Treat warnings as errors (exit code 1)". L997-998 says it "makes a run with one or more warnings exit 1".
    • The "Warnings checked" list at L987-995 is open-ended. It includes "Every warning-severity finding the rule registry raised (…)". Even before this PR it did not list the capability-provider warnings, which --strict already counted. A CI job that runs --strict has opted into a set that grows.
    • What os validate accepts by default is unchanged on both faces.
    • The card body itself asks for this behaviour ("a warning by default and an error under --strict").
    • The changeset now follows the 7a1faf1 precedent that 6975671274 cited (yes (widening), with the --strict exit-1 effect stated for CI). It does not follow the per-package-rule entry that called the same effect BREAKING.
    • Escalation (a) in 6975671274 is therefore answered by the seat's ruling, and the tier stays TIER_DEFAULT.
  • Clause-②: yes (widening). The changeset and the PR body now say everything the diff publishes, including the --strict exit path.

③ Boundary flags

  • M1: closed. The changeset states the os validate --strict / --json --strict exit-1 path for an unwired or unloadable enterprise token, and that the exit is unchanged without --strict and in os build. Both statements are accurate against validate.ts (strictFailing) and compile.ts (flags) at this head. The PR body risk line is corrected.
  • The optional cli.mdx item from M1 was not taken. That item was adding the capability-provider advisories to os validate's "Warnings checked" list. The gap predates this PR, and the item was offered as optional. No finding.
  • Escalation (b) from 6975671274 is resolved by the seat. The claim 6971821177 says "no --strict error is added". No --strict-specific gate was added. The new findings are ordinary warnings, and --strict's existing meaning promotes them. The card body asked for exactly that, and the seat's ruling accepts it. It is now declared in the changeset and in the PR body. Nothing is open.
  • Dev flags. os-dev-report 6976004319 has open_questions: [] and out_of_scope_findings: []. Its premise_still_valid: true differs from rounds 0 and 1 (false, since the card's literal case was already refused). It concerns the round-2 premise, M1, and changes nothing here. The carriers cli: should os verify fail like os validate on cloud capability tokens with no provider (exit parity) #35170, skills: hierarchy-scope rows and os verify output do not name the new capability advisory and the capabilities field #35171, runtime: the owner-only fallback for a missing hierarchy-security provider logs nothing outside the CLI #35172 and capabilities: the registry has no per-token provider identity, so the CLI wiring check matches any security-enterprise class #35173 stand as 6975671274 recorded them.
  • SQL push-down: no finding. The delta is one changeset line, and the net diff's finding from 6975671274 stands: it adds no data query, id materialisation or in-app join.
  • Author: PR user.login is objectstack-fleet[bot], so there is no relay note.
  • Gates: all 55 check-runs on d04836d59af212b7ed07c5f3f50949f15c468212 were completed at 2026-11-18T10:46Z: 40 success, 15 skipped, 0 failed. At the first read (10:39Z), 4 Test Core shards (1, 3, 6 and 7 of 10) were in_progress. I waited and re-read: all 10 shards and the Test Core summary are success. Lint & Repo Gates, TypeScript Type Check, Build Core, Governed Surface Queue Guard, Live E2E UI, Test UI, Dogfood Regression Gate, Check Changeset and the PR-body guards are success. The UI-lane jobs (Lint UI, Type Check UI, Build & E2E UI, Test UI shards) are skipped, because no ui/ path is in the diff.

Implemented-by: claude/issue-34726-enterprise-capability-finding
Reviewed-by: session_01JQwxbaX2qDxUq9sF93EqqL

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbXr9wLAH24MEgxaLud

席位核对

L1 delta · ACCEPT · Head-sha: d04836d59af212b7ed07c5f3f50949f15c468212 · card #34726 · read 2026-11-18T10:47Z

I read the delta only, from 18ce97f8 (my ACCEPT 6975661070) to this head.

  • One commit, one added changeset bullet. It closes L2 M1 (FAIL 6975671274). The bullet says that os validate --strict (text and --json) now exits 1 for a stack whose enterprise capability package resolves but is not wired, or resolves but fails to load. It also says the exit status is unchanged without --strict and in os build.
  • Checked against the code at this head.
    • preflightProviderWiring returns both the unwired and the unloadable state.
    • In validate.ts, those findings join capProviderWarnings (L1051). That list is pushed into warnings (L1315), and warnings minus info findings is strictFailing (L1369). flags.strict && strictFailing > 0 exits 1 on both faces (L1440, L1476).
    • Without --strict nothing changes. compile.ts adds the same findings to its warnings but has no flag that fails on them. Every sentence of the bullet holds.
  • Declarations. Clause-②: yes (widening) stands. --strict is documented to fail on any warning, so one more warning class reaching it stays inside that contract and is not a narrowing. patch and Metadata-protocol: none are unchanged and right. The PR body's risk line now says the same.
  • Check-runs at this head: 55 in total, all completed, none failed. The rest are skipped (opt-in, schedule or filter). Test Core (all 10 shards and the summary), Lint & Repo Gates, TypeScript Type Check, Check Changeset and the PR-body guards are all success.
  • L2: the delta PASS 6976271014 at this head closes M1.

Nothing else is owed from L1. Landing goes through the seat.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#1 · os-warren · session_01JQwxbaX2qDxUq9sF93EqqL

Landing · 2026-11-18T10:48Z. Head d04836d59af212b7ed07c5f3f50949f15c468212:

Marked ready, and auto-merge is armed.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 18, 2026 10:48
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 910306b Nov 18, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/l tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

os validate / os verify name Enterprise-only vocabulary (hierarchy scopes) on Community instead of letting it fail closed silently

2 participants