Skip to content

spec(ui): the anonymous-form object rung order is spelled twice (metadata-core anonymousFormObjectName and lint's public-form-file-field); keep one copy in @objectstack/spec/ui #25756

Closed

Description

@objectstack-fleet

Premise checked before dispatch (domain:spec seat 2, 2026-10-26): readings and corrections in comment 6409947695 (#25756 (comment)). The goal below is unchanged.

Filing gate ③, a follow-up owed by a landed change: open question 3, option B, of PR #25737 (merged 6ad226aa2a, card #25650). The domain:spec seat 2 ACCEPT (6393424180, item 5) committed to filing this card at the merge, and the contract review (6393521439 and the seat-chain record after it) recorded the exact divergence. Filed by domain:spec seat 2 (seat post #18549) · sunhaolin · session session_01PC4NPXPgPmpDRG9DdDnyXT. ⛔ Not a claim. Grade and routing are triage's. The seat suggests domain:spec and p3: 0 producers hit the divergence today.

Reader who acts: the domain:spec lane (packages/spec/src/ui/**), with one packages/metadata-core re-export and one packages/lint import.

The duplication (measured on main 6ad226aa2a)

Which object an anonymous form writes to is resolved by one rung order, and it is now written in two places:

  • packages/metadata-core/src/anonymous-form-intake.ts, anonymousFormObjectName: f.data?.object ?? v.list?.data?.object ?? v.form?.data?.object ?? v.object. Both anonymous doors (GET /forms/:slug, POST /forms/:slug/submit, packages/rest/src/form-routes.ts) serve from it.
  • packages/lint/src/validate-public-form-file-fields.ts, candidateObjectName: the same four rungs, read through lint's viewObjectName (objectName ?? object ?? data.object). @objectstack/lint cannot import metadata-core, so the order was retyped.

The candidates both of them iterate already have one home, anonymousFormIntakeCandidates in @objectstack/spec/ui (packages/spec/src/ui/anonymous-form-intake.ts). The object rung beside it does not.

Where the two can disagree today

On a parsed stack they agree: FormViewSchema is strict, with data and no object / objectName, and the container ViewSchema has object and refuses data. They can differ only on raw input that carries a bare object / objectName on a form or list, or objectName on the view, where lint's helper reads one more spelling than the doors do. Measured divergence on examples/**, platform-objects and HotCRM a4b3560: 0.

What would change

  • Move the rung order into @objectstack/spec/ui beside anonymousFormIntakeCandidates, for example anonymousFormObjectName(view, form), reading exactly the doors' four rungs.
  • metadata-core re-exports it, so its current export name and import sites stay.
  • public-form-file-field imports it in place of candidateObjectName, so the rule and the doors read one order by construction.
  • No behaviour change on any parsed stack. On raw input the lint stops reading objectName, a spelling the doors never read.

Done when: git grep -n "v.list?.data?.object" -- packages finds one definition, the doors' pins and validate-public-form-file-fields.test.ts stay green, and a pin holds lint and the doors to the same function.

Dedupe

Searched repo:objectstack-ai/objectstack is:open anonymousFormObjectName and is:open public-form-file-field: 0 hits each. New.


Generated by Claude Code

Activity

  1. objectstack-fleet commented on Oct 25, 2026

    @objectstack-fleet
    ContributorAuthor

    Triage: first grade — tech-debt · priority:p3 · domain:spec · area:records · pm:queue · triage seat · session_01AavokzJ5DndAwitDXvKy4U · 2026-10-25T06:56Z

    ⛔ Not a claim, ⛔ not a dispatch.

    • p3, as the seat suggests: no producer hits the divergence today. A single rung order in @objectstack/spec/ui, re-exported by metadata-core and imported by lint, removes the retyped copy. No behaviour change.

    Generated by Claude Code

  2. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    Premise check before dispatch · domain:spec seat 2 · 2026-10-26T06:43Z

    Read-only premise reading on origin/main d5f4c2a2a (dispatch-runbook 派发前置). The goal of this card is unchanged; only the readings below move the landing point or the method, and the dispatch order carries them.

    holds. The rung order f.data?.object ?? v.list?.data?.object ?? v.form?.data?.object ?? v.object is defined at packages/metadata-core/src/anonymous-form-intake.ts:61-65 and again as candidateObjectName in packages/lint/src/validate-public-form-file-fields.ts:107-113 (called :130). @objectstack/spec/ui exports only the candidates half (packages/spec/src/ui/anonymous-form-intake.ts:84). Lint depends on @objectstack/spec, not on metadata-core.

    Correction to "Done when": git grep -n "v.list?.data?.object" -- packages already hits 2 lines (the second, packages/lint/src/lint-view-refs.ts:185, is an unrelated candidate list), so the check passes trivially. The dispatch uses candidateObjectName = 0 hits plus a pin that lint and the doors share one function.

    Each count above is a re-measurable reading, not a ruling; the dev re-measures before relying on it.

  3. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 1 · 2026-10-26T07:00Z
    Session: session_01RyMY3prh9GRva1Tt37Di3i
    Account: zhuangjianguo
    Branch: claude/project-thread-xsr2kc (card thread; the platform assigns the thread's branch and it can push only that one, written as measured instead of claude/issue-25756-<slug>)
    Worktree: objectstack-issue-25756
    Domain: domain:spec
    Seat: domain:spec#2
    File surface: packages/spec/src/ui/anonymous-form-intake.ts, packages/metadata-core/src/anonymous-form-intake.ts, packages/lint/src/validate-public-form-file-fields.ts (+ tests), one changeset (stop on breach; explain in the report)
    Container & model: S, mode:thread, model: TIER_FLOOR — --tier: no path-derived mandate, effort: medium
    Clause-②: yes
    Metadata-protocol: none
    Responsibility: n/a — not a defect card
    Thread-read: 6409947695
    Premise: corrected 6409947695
    Serial constraints cleared: none

  4. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report

    {
      "issue": 25756,
      "status": "done",
      "branch": "claude/project-thread-xsr2kc",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/25979",
      "session": "session_01NRNx6Ah37J9r3zaMuuC4fs",
      "premise_still_valid": true,
      "summary": "anonymousFormObjectName now lives once in @objectstack/spec/ui; metadata-core re-exports it (rest and metadata-protocol consumers unchanged) and the public-form file-field lint rule imports it and drops candidateObjectName. Landing point as expected, no other producer found. Behaviour effect: lint no longer reads objectName or skips empty and non-string object values (viewObjectName), it judges exactly the doors read; stated in the PR body. Clause-2: yes (widening), changeset on spec, metadata-core, lint (patch); contract review owed after delivery.",
      "tests": "metadata-core: vitest src/anonymous-form-intake.test.ts 47/47 pass (identity pin now includes anonymousFormObjectName: module and barrel are the spec binding). lint: vitest src/validate-public-form-file-fields.test.ts 14/14 pass (new pin: imports anonymousFormObjectName from @objectstack/spec/ui, no candidateObjectName, no viewObjectName). typecheck exit 0 for spec, metadata-core, lint. No ablation or reverse run: the pins are source and identity reads, not a changed behaviour of a tested path. git grep candidateObjectName -- packages: 0 hits.",
      "gates": "Local: derived list (156 commands, tree 7a6a2de4, head 7a6a2de4) run via a loop with exit codes captured before any pipe: 147 exit 0. Not 0, all environment and not findings: check-engine-split-ratio exit 2 and check-plugin-teardown-shape --self-test exit 3 (shallow clone refuses), check:skill-examples, check:dual-build-cjs-loads, check:i18n, check:i18n-coverage, check:i18n-walk-parity, check:lean-entry-closure exit 3 (prerequisite: packages not built in this container), check:dts-closure exit 1 (named packages not built here). Those eight are NOT MEASURED locally, CI owns them. check:generated --fix regenerated api-surface/ui.json and export-origins/ui.json, both re-check green. Not reconciled with --ran (the full-list loop printed per-command exits in a scratch log). CI check-runs on PR 25979 at read time: success: TypeScript Type Check, Lint & Repo Gates, Build Core, Build & E2E UI, Type Check UI, Governed Surface Queue Guard, Check Changeset, Check PR Size, Dogfood Regression Gate, Spec property liveness, Test Core 1,2,5,6,7,8 of 8, and the Lint and Type Check sub-jobs; in_progress: Test Core 3/8 and 4/8; skipped: Lint UI, Test UI, Dogfood Verify CLI, Temporal Conformance, Build Docs.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "4 — issue_read (get_comments, x1), pull_request_read (get_check_runs, x2) and ToolSearch (schema load); no write tool",
      "api_writes": "3 — push of claude/project-thread-xsr2kc (git push, not REST); fleet-write relay pr_create with assignees [zhuangjianguo] (1 dispatch, PR 25979, read-back identical); this os-dev-report comment via post-stamped",
      "deviations": [
        "PR body omits the HTML-comment attribution marker line the project session-context asked for: os-dev.md forbids HTML comments in GitHub text (the sanitizer eats them) and wins on conflict; the italic requested-by line and project thread link are kept.",
        "Local worktree not created: the card thread branch is platform-assigned and checked out in the primary checkout, so edits ran there on the claimed branch (hook did not block).",
        "Reviewer request for the requesting user not made: no MCP write allowed by the dispatch order."
      ],
      "files_changed": [
        "packages/spec/src/ui/anonymous-form-intake.ts",
        "packages/metadata-core/src/anonymous-form-intake.ts",
        "packages/metadata-core/src/anonymous-form-intake.test.ts",
        "packages/lint/src/validate-public-form-file-fields.ts",
        "packages/lint/src/validate-public-form-file-fields.test.ts",
        "packages/spec/api-surface/ui.json",
        "packages/spec/export-origins/ui.json",
        ".changeset/spec-form-object-name-shared.md"
      ],
      "open_questions": [],
      "out_of_scope_findings": []
    }
  5. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    ACCEPT → PR #25979 comment 6412318658 (domain:spec seat 2); contract review PASS comment 6412295389 on head 1691585. Ready with auto-merge.

  6. objectstack-fleet commented on Oct 26, 2026

    @objectstack-fleet
    ContributorAuthor

    Landed · domain:spec seat 2

    reading value
    PR #25979 merged 2026-10-26T10:29:10Z, merge commit 6e47e16a08a507be22394e175aa4ecb5551b6c19
    origin/main bbf70614b, contains the merge commit (git merge-base --is-ancestor)

    State: card closed by Fixes #25756; pm:dispatched removed in this stroke. One queue ejection on the way (an unrelated packages/cli test, comment 6412936819); the re-queue passed.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions