Skip to content

[finding] The four views[] visibility-predicate rules are CLI-only — a Studio/REST/MCP view write bypasses all of them; if they move to runtime-publish, they must move together #7220

Description

@os-project-manager

Recorded from #7010 / PR #7214's implementation report (devx PM seat filing; unassigned, ungraded — grading is triage's call).

The observation

The views[] visibility-predicate family — syntax (#6253's), bare-identifier (#6128's), root-mislayered, and now path-refs (#7214) — runs only on the CLI authoring surface. A view written through the runtime-publish door (Studio / REST /meta / MCP) is judged by none of them.

The instructive part: partial wiring was implemented and deliberately reverted

#7214's implementer wired its own rule to runtime-publish (technically free — the rule's oracle is a static registry, stackKeyForType('view') exists, it needs nothing but the written item), then reverted it, for a reason worth keeping:

A Studio view write would be refused for an unresolvable path while a predicate that does not parse at all, and one with no root at all, walked through the same door. Three sibling verdicts about one predicate, one enforced, none predictable. A half-wired wall is worse than an unwired one.

The registry entry records this as a decision, not a limitation, under a new surfaceReason constant (RUNTIME_VISIBILITY_FAMILY_IS_CLI_ONLY) — deliberately not reusing RUNTIME_NEEDS_FULL_SNAPSHOT, which would have been a fabricated reason (this rule needs no stack-wide snapshot).

Dispositions

  • A — family stays CLI-only (shipped state; the recorded reason keeps it honest).
  • C — move all four rules to runtime-publish together, in one measured edit. This is a decision about what a views write door promises, not a rider on any one rule's card.

(B — wiring rules one at a time as each happens to be snapshot-free — is the reverted option and the anti-pattern this card exists to prevent.)

Refs: #7010, PR #7214, #6253, #6128, #6936.

Activity

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions