Skip to content

fix(cli): print the deployment-policy unbound-flow class under a dim ℹ glyph - #22409

Merged
objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-22255-policy-unbound-info-glyph
Oct 9, 2026
Merged

objectstack-fleet[bot] merged 1 commit into
mainfrom
claude/issue-22255-policy-unbound-info-glyph

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #22255

Clause-②: no

What changes

The startup banner's Flows: section prints one line per unbound-flow class (trigger type, reason), and every class printed as a yellow ⚠. A class whose reason is the deployment's scheduled-work sentence (flows left unbound only because package-authored scheduled work is off, the documented default) now prints dim, under ℹ. It keeps its count, trigger type, first sentence and flow list. Every other reason keeps its yellow ⚠: a missing trigger, a binding failure, anything else. The unknown-target-object and shadowed-flow lines are untouched.

This applies the routing of record (triage 6057431712), which executes the maintainer's direction on #22160, quoted verbatim: 「预期中的降级记 info」.

  • packages/cli/src/utils/format.ts: a new isDeploymentPolicyClass(reason) and the class loop in printAutomationSummary. Only the glyph and the color depend on the class. The line's text, the class order and the records handed back to Boot diagnostics (restatedAbove) are unchanged.
  • ⛔ Not changed: the automation plugin's binding, the scheduled-work switch, @objectstack/service-automation's own log level, serve.ts and packages/spec.

How the class is told apart: identity, not prose

isDeploymentPolicyClass is reason === SCHEDULED_WORK_DISABLED_REASON (@objectstack/types). Measured on origin/main at 11d119ab1:

  • The engine records scheduledWorkDisabledReason(policy) from the policy reading that refused the bind (activateFlowTrigger). describeUnboundReason reads that record back for getTriggerBindingAudit, and collectAutomationSummary passes it through unchanged.
  • For every policy the environment resolves, that function returns the constant byte for byte: resolveScheduledWorkPolicy never sets hostDisabledReason (pinned in env.test.ts).
  • The test file's real-producer leg boots the real AutomationServicePlugin on a LiteKernel and reads the summary through collectAutomationSummary. Its schedule line is now asserted to start with ℹ, so the identity is pinned against what the producer actually records. If the producer is reworded, the line goes back to ⚠, which is the loud direction.
  • The check does not call scheduledWorkDisabledReason(resolveScheduledWorkPolicy()). On that reading the call returns the same constant by construction, and the resolver throws on an unrecognised OS_TENANCY_POSTURE, which a printer must not do.
  • No structured kind was needed. So neither serve.ts (held by PR feat(core,cli,verify): bootStack composes what serve composes — item 1 stage 2 of #22301 (HELD at stop conditions) #22381) nor the spec contract is touched.

Pins (format.boot-warning-classes.test.ts)

  • Real boot (eight scheduled flows, switch off): the one schedule line now starts with ℹ 8 flows declare.
  • Policy class: prints dim (opening SGR ESC[2m, no yellow) under ℹ, with its flows and first sentence. Controls: a missing trigger and a binding failure keep a yellow (ESC[33m) ⚠.
  • ⛔ Identity, not words: three reasons that only quote the policy all keep ⚠. They are a binding failure carrying the policy's first sentence, the whole sentence inside a longer record (the schedule trigger's own refusal shape), and the first sentence alone.
  • restatedAbove is the same under both glyphs: a policy flow, a missing-trigger flow and a binding-failure flow, each with its producer audit record. Every flow is named once, and no Boot diagnostics block prints.
  • The existing first-sentence pin moves from ⚠ to ℹ.

Evidence (head 62c86cba9, branched from 11d119ab1)

Public door. objectstack dev --seed-admin --fresh -p 38421 on examples/app-showcase, with the CLI built from this head. The Flows section, SGR stripped and the shared sentence cut to an ellipsis:

  Flows:   30 flow(s) 20 bound to triggers (record_change, schedule, time_relative, api) · 7 draft
  ℹ 1 flow declares a 'time_relative' trigger but is NOT bound — disabled by deployment policy — … : showcase_task_due_reminder
  ℹ 1 flow declares a 'schedule' trigger but is NOT bound — disabled by deployment policy — … : showcase_scheduled_digest
      reasons cut to their first sentence — --log-level debug prints each flow's full reason
  Seeds:   com.example.showcase 132 rows

  ℹ Boot diagnostics — 1 informational (2 more already listed above):

Both class lines open with the dim SGR (ESC[2m) in the raw capture, and Boot diagnostics still withholds the two restated records. That boot printed two other ⚠ lines, both about this worktree having no console build (packages/console/dist and the SDUI manifest). They come from the environment, not from this change.

Tests and gates, all at 62c86cba9:

Check Result
pnpm --filter @objectstack/cli exec vitest run --project unit --maxWorkers=2 270 files, 3971 tests passed, lock VERDICT command-exit 0
format.boot-warning-classes.test.ts alone 21 of 21 passed
pnpm --filter @objectstack/cli typecheck exit 0 (tsc --noEmit, then check:test-typecheck over tsconfig.test.json)
pnpm lint (full: eslint . --no-inline-config) exit 0, no findings
derived gate families dispatch-gates --ran: 64 derived, 64 run, 0 NOT-MEASURED, 0 UNRUN (a derived zero, every exit code recorded)

The integration layer is declared to CI: the diff reaches no integration file and no spawn entry.

Ablation. Run on the committed fix with scripts/ablation-replace.mjs. In each leg the anchor went from 1 hit to 0, and the restore brought the blob back to 5804f510beed, equal to HEAD, with git diff HEAD empty.

  • Leg 1, identity forced to false: 3 failed, 18 passed. The failures are the real-boot ℹ pin, the first-sentence pin and the dim/ℹ pin.
  • Leg 2, identity replaced by reason.includes('disabled by deployment policy'): 1 failed, 20 passed. The failure is the identity pin.

The test imports ./format.js, which vitest resolves to src/utils/format.ts, so neither leg depended on a dist rebuild.

Acceptance notes

  • Host-injected policy. A per-kernel ScheduledWorkPolicy that carries its own hostDisabledReason keeps ⚠. That sentence is the host's, not the documented default, and the printer cannot know it. For this banner the case is dormant: git grep finds 0 non-test producers of hostDisabledReason: in the tree, against a positive control of 4 hits in test files. Telling that class apart would need a structured kind on the audit row (the spec contract plus serve.ts), which this PR does not add.
  • Contract wording. FlowRuntimeState.reason in the spec contract says consumers render the reason and do not parse it. An equality check against the exported producer constant is not parsing, and no prose match was added.
  • Stale prose this change makes inaccurate, left unedited (outside the claim's file surface):
    • docs/qa/platform-checklist/areas/platform-core.json acceptance[2].verify describes the policy lines as ⚠ … disabled by deployment policy. Its clause (fail on the misauthored ⚠ classes) still holds, and is now easier to apply.
    • The still-pending .changeset/22073-boot-warning-one-line-per-class.md quotes the class with ⚠. This PR's changeset states the move to ℹ, and the two would ship in the same release.
  • Line order is unchanged (first-seen). A dim policy line can still print above a ⚠ class: the one-line-per-class order belongs to the earlier ruling and was not re-ruled.

Generated by Claude Code

…info glyph

Flows left unbound only because the deployment switched package-authored
scheduled work off (the documented default) print as information in the
startup banner's Flows section; every other unbound reason keeps its
yellow warning. The class is recognised by identity with the engine's
recorded sentence (SCHEDULED_WORK_DISABLED_REASON), never by its words.
Text, order and the records handed back to Boot diagnostics are unchanged.

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BmsuLyUeuG5CNpZFMH1jzS
@github-actions github-actions Bot added the size/m label Oct 9, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling labels Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

2 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • the SDK route bridge reached 54 of 206 client-bound route-ledger rows — the other 152 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 152: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 55 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 97 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 — 28 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 11d119ab1868a658c5f43538f3026a56438b2ed6 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 9ee9fdb3ffa89915d770c3ba495c7720c5b6de8b — the merge of head 62c86cba95aed93c690c7b6490de0e97a9bda344 into base 11d119ab1868a658c5f43538f3026a56438b2ed6, 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 9ee9fdb3ffa89915d770c3ba495c7720c5b6de8b && git checkout 9ee9fdb3ffa89915d770c3ba495c7720c5b6de8b
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 11d119ab1868a658c5f43538f3026a56438b2ed6 62c86cba95aed93c690c7b6490de0e97a9bda344 && git checkout -B drift-repro 11d119ab1868a658c5f43538f3026a56438b2ed6 && git merge --no-ff 62c86cba95aed93c690c7b6490de0e97a9bda344

node scripts/docs-audit/affected-docs.mjs --json 11d119ab1868a658c5f43538f3026a56438b2ed6

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

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 9, 2026 03:46
@objectstack-fleet
objectstack-fleet Bot enabled auto-merge October 9, 2026 03:46
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 9, 2026
Merged via the queue into main with commit abd2545 Oct 9, 2026
36 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-22255-policy-unbound-info-glyph branch October 9, 2026 04:17
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/m tests tooling

Projects

None yet

2 participants