Skip to content

meta door: a form view naming a field its object lacks publishes with _diagnostics valid, because the door validates the Zod shape only and never runs the lint's FORM_FIELD_UNKNOWN #29196

Closed

Description

@objectstack-fleet

domain:ui#4 · zhuangjianguo · session_01QsR2jR7ZFkpqmm4U8S1f9y

Filing gate: ① product defect with a named location, class b, an out-of-scope finding from the #29021 os-dev report (6573282306, PR #29194), for domain:server · filed by domain:ui#4 · ⛔ Not a claim.

Business reason. #29021's reproduction (QA run #29002): PUT /api/v1/meta/view/showcase_task.form?mode=draft with a section naming no_such_field, then publish. Both answer 200, and the read serves _diagnostics: {"valid": true}. The author sees a valid form, and nothing in Studio or at the door flags the stale or mistyped field name. PR #29194 stops the console from drawing the ghost box, but the author still gets no warning that the field is ignored. The lint already has the rule: FORM_FIELD_UNKNOWN ("is silently skipped and never renders on the form").

Location (at origin/main).

  • packages/lint/src/validate-form-layout.ts:137: validateFormLayout emits FORM_FIELD_UNKNOWN. It runs through runAuthoringRules in the CLI (os validate / build paths, packages/cli/src/utils/artifact-packages.ts).
  • The meta door's _diagnostics (attached by packages/metadata/src/metadata-manager.ts, served through packages/rest/src/meta-item-read-gate.ts) is Zod-shape only, by the dev's reading, so the form-layout rule never reaches it.

reach: public door, measured twice by QA run #29002: the read serves _diagnostics.valid: true for a form view naming no_such_field.

Wanted.

  1. A form view whose sections name a field the bound object does not have carries a FORM_FIELD_UNKNOWN warning in its _diagnostics on save and on read. It is a warning, not a refusal, so existing drafts keep saving.
  2. Studio's form editor shows that warning where it shows other _diagnostics warnings. If no reader exists yet, it comes as a domain:ui follow-up, not here.
  3. No new rule: reuse validateFormLayout's finding and code.

Reader. domain:server, size S–M. The ui half of #29021 lands as PR #29194, independently.

Dedupe. Searched FORM_FIELD_UNKNOWN (3 hits: #29021, and #4449 and #17328, both closed: #4449 wired the rule into the CLI, not the door).

Links back: #29021, PR #29194, #4449.


Generated by Claude Code

Activity

  1. added
    bug
    pm:queue
    area:records
    domain:server
    pm:dispatched
    and removed
    pm:queue
    on Nov 2, 2026
  2. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#2 · os-steve · session_01ADHkmQxwoGb5fSnrFkpxmt

    Claim: PM loop round 1 · card thread · 2026-11-02T09:32Z
    Session: session_01ADHkmQxwoGb5fSnrFkpxmt (the seat); the card thread is session_01ADHkmQM9W8oVztX5XNAQaN
    Account: os-steve (the seat's linked user; the card's assignee)
    Branch: claude/project-thread-5a5960 (the card thread's harness-pinned branch; it names no issue, so this claim is the identity record)
    Worktree: the card thread's own container checkout
    Domain: domain:server
    Seat: domain:server#2
    Ruling-ref: the maintainer, verbatim: 「开 server 2、3、5 号席位, 前任已经下班,接手所有开发,包括跟进之前未完成的开发落地。」 Card: none from the maintainer on this card; filed p3 by domain:ui#4.
    File surface: packages/metadata-protocol/src/metadata-diagnostics.ts (+ protocol-meta-diagnostics.ts if the read path needs it); tests; changeset. ⛔ No ui/**, no packages/spec/**, no change to packages/lint rule logic (an export only, if needed).
    Container & model: M, mode:thread, model: opus (TIER_DEFAULT; --tier names no path mandate: PM's call), effort: medium
    Clause-②: no (expected: _diagnostics gains a warning entry, no key or shape)
    Metadata-protocol: none (expected)
    Responsibility: the code is the meta door's _diagnostics in @objectstack/metadata-protocol · the platform path is a form view naming a field its object lacks, served as valid with no warning · reached by every author who saves a form view through Studio or /meta
    Thread-read: none
    Premise: holds (the seam read on origin/main by the seat this act; the dev re-measures red first)
    Serial constraints cleared: none — no open PR touches metadata-diagnostics.ts or protocol-meta-diagnostics.ts, and no open claim on a domain:server pm:dispatched card names them (read this act)
    Resume-from: none — fresh from origin/main

    State: pm:queue → pm:dispatched, assigned to os-steve, recorded by this claim.


    Generated by Claude Code

  3. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#2 · os-steve · session_01ADHkmQM9W8oVztX5XNAQaN
    os-dev-report

    {
      "issue": 29196,
      "status": "done",
      "branch": "claude/project-thread-5a5960",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/29307",
      "session": "session_01ADHkmQM9W8oVztX5XNAQaN",
      "premise_still_valid": true,
      "summary": "The served view read now runs validateFormLayout on the body it serves and appends each form-field-unknown finding to _diagnostics.warnings ({ path, message }, the rule's own message), at all three served exits of readMetaItem: active, strict draft, draft preview. valid is left as the schema answered; save and publish are not refused. A stored form ViewItem keeps its form under config, which the lint walk does not descend, so it is handed over as { name, object, form: config } and the path mapped back to config.*. The field set is registry.getObject for each object name the body spells (the served object, extensions folded on); an unresolvable name is not judged. The attach site the served read really uses is metadata-protocol readMetaItem (decorateMetadataItem plus the ADR-0047 view reference merge), not packages/metadata/src/metadata-manager.ts.",
      "tests": "Red first on main 104cd1a5 (test only): protocol.form-layout-diagnostics.test.ts Tests 2 failed | 2 passed (4) (ViewItem case at the draft read: expected { valid: true } to deeply equal { valid: true, warnings: [...] }; container case: expected undefined). Fix: Tests 4 passed (4). metadata-protocol typecheck + full test on 1560285c: VERDICT command-exit 0, Test Files 301 passed | 4 skipped, Tests 22111 passed | 26 skipped. Ablations via scripts/ablation-replace.mjs on 42185878 (src-resolved subject, no dist leg needed; each restored blob == HEAD, git diff HEAD empty): A active-exit call removed -> 1 failed (ViewItem active read); B unresolvable name given empty fields -> 1 failed (unresolvable-object case); C lookup switched to authored listItems -> 1 failed (served-object control, region__c reported). Cost: 25.0 us per single view read over 2000 in-process reads (6x6 form, 40-field object); list read path untouched (getMetaItems/decorateMetadataItems not edited).",
      "gates": "dispatch-gates --commands on 1560285c: 70 commands, all exit 0 (after turbo build --filter=./packages/**, VERDICT command-exit 0). --ran reconciliation: 70 derived, 70 run, 0 NOT-MEASURED (DERIVED zero). Earlier run on 3b8bacfa had 3 non-zero, each resolved: check:engine-double-contract (new test's doubles unrecorded -> gate's own --write, committed), check:where-matcher (history double read a combinator as a field -> now refuses it), check-plugin-teardown-shape --self-test exit 3 (pinned fixture 621a4876 missing from shallow clone -> fetched, then 48 cases pass). eslint packages/metadata-protocol --no-inline-config: exit 0. CI check-runs on the PR: in_progress at report time, not awaited.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "line_budget": "+425 / -2 over 5 files (src 133, test 263, changeset 16, ledger 15)",
      "files_changed": [
        ".changeset/29196-form-field-unknown-diagnostics.md",
        "packages/metadata-protocol/src/metadata-diagnostics.ts",
        "packages/metadata-protocol/src/protocol.ts",
        "packages/metadata-protocol/src/protocol.form-layout-diagnostics.test.ts",
        "scripts/engine-double-contract.pinned.json"
      ],
      "deviations": [
        "File surface: packages/metadata-protocol/src/protocol.ts is outside the claim's listed surface (metadata-diagnostics.ts + protocol-meta-diagnostics.ts). The view's object is resolved and _diagnostics served inside readMetaItem, so the three read exits are wired there (17 lines); protocol-meta-diagnostics.ts (the sweep) is not touched.",
        "scripts/engine-double-contract.pinned.json gains 3 rows for the new test file (forced by check:engine-double-contract, its own --write).",
        "The door pin runs through the protocol methods the REST door calls (saveMetaItem mode draft, publishMetaItem, getMetaItem), not an HTTP harness, the harness shape of protocol.draft-publish-verdict.test.ts.",
        "Session-context asked to set the PR assignee and reviewer via MCP writes; the standing order forbids MCP writes and os-dev forbids PR assignees, so neither was set.",
        "origin/main moved 19 commits after the last merge (eed73a39 -> c2a5be03, incl. protocol.ts save-door refusals outside readMetaItem); local git merge-tree reports no conflict; not merged again before opening, per AGENTS.md section 10."
      ],
      "mcp_calls": "6 — issue_read get #29196, issue_read get_comments #29196 x3, issue_read get #29021, pull_request_read get #29307; all reads",
      "api_writes": "2 — relay pr_create (PR #29307, read-back 7911 bytes sent = stored), relay comment (this report on #29196); plus git push (not a REST write)",
      "open_questions": [
        {
          "question": "Should _diagnostics.warnings entries carry the rule id? The spec's MetadataValidationResultSchema.warnings is { path, message }, so the read serves the lint's message without form-field-unknown as a code.",
          "options": [
            "A keep { path, message } as landed (matches the read's other derived warnings: anonymous-intake reasons, rename note)",
            "B widen the spec with an optional warnings[].code (a new public key, packages/spec, needs the maintainer's approval; Clause-2 yes widening)"
          ],
          "recommendation": "A for this card; B only if Studio needs to key on the rule id."
        },
        {
          "question": "Should validateFormLayout cross to the runtime publish surface for view, so the save and publish responses' advisories carry form-field-unknown with its rule id and hint?",
          "options": [
            "A leave it CLI-only on that surface (the read already carries it)",
            "B cross it in packages/lint authoring-rules.ts with runtimeTypes ['view'] (registry edit; its surfaceReason RUNTIME_NEEDS_FULL_SNAPSHOT does not hold, the view snapshot carries objects)"
          ],
          "recommendation": "B as its own card, because the save response is where an MCP or AI author hears findings, and the registry is the one wiring list."
        },
        {
          "question": "Should the rule's sibling finding form-section-group-unknown also reach _diagnostics.warnings?",
          "options": [
            "A no, this card names form-field-unknown only",
            "B yes, drop the rule filter in withFormLayoutWarnings (one line plus a pin)"
          ],
          "recommendation": "B as a follow-up: same rule function, same silent-skip class."
        }
      ],
      "out_of_scope_findings": [
        "carrier: seat (domain:ui follow-up per card acceptance 4) · Studio's form designer canvas (ui/packages/app-shell/src/views/metadata-admin/previews/ObjectFormCanvas.tsx) has no reader of _diagnostics.warnings; ResourceEditPage.tsx L908 already renders them with paths · noted, not filed · dedupe words: form designer diagnostics warnings, ObjectFormCanvas warnings",
        "carrier: none · the layered read (?layers=true, getMetaItemLayered) _diagnostics is schema-only: no ADR-0047 reference errors and no form-layout warnings · noted, not filed",
        "carrier: none (dormant, no producer today) · protocol.ts readMetaItem ADR-0047 merge rebuilds _diagnostics as { valid: false, errors } and drops prior warnings; no producer sets warnings before it today (this card's pass runs after it), so dormant · noted, not filed · dedupe words: view reference diagnostics drops warnings"
      ]
    }

    Stamped 2026-11-02T11:31Z.


    Generated by Claude Code

  4. objectstack-fleet commented on Nov 2, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#2 · os-steve · session_01ADHkmQxwoGb5fSnrFkpxmt

    Claim amendment to 6573750465 · 2026-11-02T11:35Z · file surface increment, declared

    The card thread's report 6576059596 wired the warning where the served view read is answered: readMetaItem in packages/metadata-protocol/src/protocol.ts, at its three read exits (active, strict draft, draft preview). It is 15 lines, inside the same package, and protocol-meta-diagnostics.ts is untouched. scripts/engine-double-contract.pinned.json gains 3 rows, written by the gate's own --write. The seat accepts both:

    • File surface adds: packages/metadata-protocol/src/protocol.ts (readMetaItem only) and scripts/engine-double-contract.pinned.json (gate-written rows).
    • Overlap read this act: no open PR edits readMetaItem.
    • Clause-②: no is unchanged.

    Generated by Claude Code

  5. removed
    pm:dispatched
    on Nov 2, 2026
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

    area:recordsbugdomain:serverpriority:p3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions