Skip to content

[observation] ADR-0058 expression-surface ratchet discovers surfaces by schema-name text — any slot narrowed onto its own schema silently drops out of the scan #7438

Closed as not planned

Description

@os-zhuang

Observation-class record from #7327's implementation (PR #7387), filed by the dispatching PM so it is not lost to session memory. The dev's own words carry the finding; this card records it for triage grading.

The fragility

packages/qa/dogfood/test/expression-conformance.test.ts (the ADR-0058 expression-surface ratchet) discovers governed surfaces by textually matching <key>: ExpressionInputSchema in schema sources. Consequence, measured live on PR #7387's first push: narrowing settings-manifest.zod.ts's two visible slots onto their own module-private schema (SettingsVisibilityInputSchema) made them drop out of discovery entirely — a live predicate surface silently leaving the ledger, i.e. the #1887 class that ledger exists to catch. Caught only because the stale ledger entry turned Dogfood Regression Gate (3/3) red.

Mitigation already landed (PR #7387)

Discovery now reads a registered schema-name list instead of one hardcoded name, and the trap is written down in both the test and the ledger header. That converts the failure from "silent drop" to "remember to register" — better, still fragile by construction: any future slot narrowed onto its own schema stays invisible unless someone registers it, and nothing fails if they don't (the stale-cover check fires only when an EXISTING entry goes stale, not when a surface never enters).

The structural fix (not attempted — larger than #7327's card)

Discover by resolved type rather than by identifier text — e.g. walk the exported schemas and detect "accepts the ExpressionInput envelope shape (or a narrowing of it)" structurally. That makes registration automatic and the ratchet complete by construction.

Refs

Filed unlabeled and unassigned for triage per the filing discipline. Dedup: open-issue search for expression-conformance discovery / ADR-0058 ratchet / ExpressionInputSchema textual returns nothing covering the discovery mechanism itself.

Activity

  1. added
    domain:cli
    finding
    on Aug 10, 2026
  2. claude commented on Aug 10, 2026

    @claude
    Contributor

    Triage: finding + domain:cli (held, not queued).

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  3. claude commented on Aug 10, 2026

    @claude
    Contributor

    Findings triage: HOLD.

    Re-verified @ origin/main 333769d: discovery still runs on the registered name list (packages/qa/dogfood/test/expression-conformance.test.ts:42, two entries) — the PR #7387 mitigation is live, the structural fix (resolved-type discovery) is not attempted, and the residual risk is unchanged: a future slot narrowed onto its own schema stays invisible unless registered, with nothing failing if it isn't. Nothing red today; held until someone takes the structural discovery as a scoped card.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  4. os-zhuang commented on Aug 11, 2026

    @os-zhuang
    ContributorAuthor

    Findings triage: HOLD.

    Re-verified @ origin/main 8dd98bf: discovery still runs on the registered name list — packages/qa/dogfood/test/expression-conformance.test.ts:42, EXPRESSION_INPUT_SCHEMAS = ['ExpressionInputSchema', 'SettingsVisibilityInputSchema'], two entries. The #7387 mitigation (register-the-name) is live; the structural fix (resolved-type discovery) remains unattempted, so the residual risk is unchanged: a future slot narrowed onto its own module-private schema silently leaves the scan unless someone remembers to register it, and nothing fails when they don't. Nothing red today.

    本评论来自分诊座位 Routine(#5474 试点),不构成认领。


    Generated by Claude Code

  5. os-zhuang commented on Aug 11, 2026

    @os-zhuang
    ContributorAuthor

    Findings triage round, 2026-08-11 (maintainer-directed). Graded: hold — the fragility is real but mitigated in PR #7387 (the stale-ledger red caught the live drop), and a structural fix means changing how the ratchet discovers surfaces. Restart: the next narrowing that silently drops a surface, or any planned ADR-0058 ratchet rework.


    Generated by Claude Code

  6. hotlong commented on Aug 12, 2026

    @hotlong
    Contributor

    Finding-grading round: closed, not planned.

    Mitigation landed in PR #7387 and is live (EXPRESSION_INPUT_SCHEMAS registration list + regex discovery, unchanged); the residual is "remember to register a future schema", held four times across two days with no pull and nothing red on main. A second silent-drop event would produce a better-informed fresh card than this one.


    Generated by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:clifinding

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions