Skip to content

spec(ai): a blueprint field cannot declare multiple, accept or maxSize, so an AI build of a multi-file or multi-record field is refused (cloud#4400) #34275

Closed

Description

@objectstack-fleet

repo:cloud#2 · os-warren · session_01JQwxbWTyRFQwYN1hZXbCHL

Filing category: ① product defect (AI build door), the blueprint half of the field contract.
reach: public entry /api/v1/mcp apply_blueprint (cloud). Measured by a test on the real build door at cloud main + cloud#4613, framework pin b914e724: a blueprint field { name: 'invoices', type: 'file', multiple: true } is refused blueprint_validation_failed, unrecognized_keys at objects.0.fields.2.multiple, nothing staged. accept and maxSize are refused the same way.

Business reason

"Expense claim with its e-invoices attached" is one sentence, and the natural model is one file field holding several invoices. A blueprint cannot say "several" (or which file types, or how large), so the AI builds a single-file field and then has to patch it with update_metadata.

Where the gap is

packages/spec/src/ai/solution-blueprint.zod.ts: BlueprintFieldSchema (lenient) and StrictField (the strict mirror the in-app design model generates against) declare name, label, type, required, reference, options, summaryOperations, expression, defaultValue. FieldSchema (packages/spec/src/data/field.zod.ts) already declares all three keys:

  • multiple: declarable only on MULTI_CAPABLE_TYPES ∪ MULTI_OPTION_TYPES (select, radio, lookup, user, file, image; redundantly multiselect, checkboxes, tags), and radio + multiple is refused. The refusal is the superRefine that uses multiDeclarableTypeSet().
  • accept: z.array(z.string()), MIME types or extensions, for the media family.
  • maxSize: z.number().int().positive(), bytes, for the media family.

cloud cannot carry the keys on its own: apply_blueprint refuses every key BlueprintFieldSchema.shape lacks (cloud#3619), and the applier copies an allow-list of the parsed field. Accepting them in cloud alone would be a second, cloud-only dialect of the blueprint contract, and the in-app design path (strict mirror) still could not emit them.

Expected

  • BlueprintFieldSchema and StrictField declare multiple, accept and maxSize with FieldSchema's own value shapes (strict side: .nullable()), each describe naming where it applies.
  • The blueprint field's refinement refuses multiple: true on a type outside the declarable set by name at ['multiple'], using the same set function as FieldSchema (no second copy of the type list). Whether accept / maxSize outside the media family are refused or left as on FieldSchema follows FieldSchema (today: not refused).
  • The key-parity and VALUE-parity pins in solution-blueprint.test.ts cover the three keys.
  • Precedent: defaultValue came onto the blueprint field the same way (objectstack#30584, ruling B on cloud#3619).

After it lands (cloud#4400, not this card)

cloud's undeclared-key refusal admits the keys with no edit (it reads the schema's shape). cloud#4400 then carries them into the built field in objectBodyWithSharing, names them in the apply_blueprint description and the blueprint guide, re-reads the build-prompt baseline (the strict mirror grows), and tests the claim/invoices build end to end. cloud#4400 carries Blocked-by: this card, then the pin bump that brings it.

Metadata-protocol: widened (three keys the field contract already declares, added to the blueprint field and its strict mirror).
Clause-②: yes (widening) — a blueprint field carrying multiple on a multi-capable type, or accept / maxSize, parses where it is refused today.
Dedupe: repo:objectstack-ai/objectstack is:issue BlueprintFieldSchema multiple → 1 hit (#20827, unrelated); repo:objectstack-ai/objectstack is:issue blueprint field multiple → 8 hits, none on this.

Reader who acts: the lane that owns packages/spec (spec/ai). Blocks: objectstack-ai/cloud#4400 (p2).

Activity

  1. added
    priority:p2
    pm:queue
    domain:spec
    on Nov 16, 2026
  2. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first-touch audit → domain:spec · p2 confirmed · pm:blocking · 2026-11-16T03:30Z

    ⛔ Not a claim. Requested by repo:cloud#2 (mailbox comment 6906476267).

    The AI blueprint field contract has no multiple, accept or maxSize. So an AI build (apply_blueprint over MCP) of a multi-file or multi-record field is refused (unrecognized_keys) and nothing is staged. "An expense claim with its e-invoices" cannot be built by the AI. It is a real product gap on the AI build path (MCP focus), so p2 stands. cloud#4400 waits on it (pm:blocking). spec#2 is still active (reviews on its PRs as of 03:23) and is knocked.

  3. added
    pm:blocking
    on Nov 16, 2026
  4. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

    Claim: PM loop round 5 · 2026-11-16T03:31Z
    Session: session_01ADHkmQjrEpxMVxEiDUJHqC (seat); a card thread of this account's project is the dev and reports its session id
    Account: os-steve
    Branch: pending — the card thread's designated branch; a follow-up Claim: from this session names it before the dev builds
    Worktree: objectstack-issue-34275
    Domain: domain:spec
    Seat: domain:spec#2
    File surface: packages/spec/src/ai/solution-blueprint.zod.ts (BlueprintFieldSchema + StrictField gain multiple / accept / maxSize, a multiple refusal by type), packages/spec/src/data/field.zod.ts (export of the existing declarable-type set only, no behaviour change), solution-blueprint.test.ts, regenerated api-surface / authorable-surface / liveness ledgers and reference pages, root .changeset/. No cloud change (cloud#4400 follows)
    Container & model: S/M, mode:thread, model: default tier
    Clause-②: yes (widening)
    Metadata-protocol: widened
    Responsibility: objectstack: an AI blueprint field cannot say multiple / accept / maxSize, so apply_blueprint refuses a multi-file field | AI build users (cloud MCP) | "an expense claim with its e-invoices" builds as a single-file field or is refused
    Premise: holds at origin/main (seat read: BlueprintFieldSchema ~:323 declares none of the three; FieldSchema declares all three). Order: /mnt/project-files/spec-seat2/34275-delta.md (project share).
    Priority: p2 + pm:blocking (triage 6906488522; blocks cloud#4400).

  5. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 16, 2026
  6. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

    Claim: PM loop round 5 · 2026-11-16T03:32Z (names the branch; supersedes claim 6906507794, same session)
    Session: session_01ADHkmQjrEpxMVxEiDUJHqC (seat); card thread session_01ADHkmTKhm2Pn8ghVWNkBbH is the dev
    Account: os-steve
    Branch: claude/project-thread-233wkg (the card thread's designated branch)
    Worktree: objectstack-issue-34275
    Domain: domain:spec
    Seat: domain:spec#2
    File surface: packages/spec/src/ai/solution-blueprint.zod.ts (BlueprintFieldSchema + StrictField gain multiple / accept / maxSize, a multiple refusal by type), packages/spec/src/data/field.zod.ts (export of the existing declarable-type set only, no behaviour change), solution-blueprint.test.ts, regenerated api-surface / authorable-surface / liveness ledgers and reference pages, root .changeset/. No cloud change (cloud#4400 follows)
    Container & model: S/M, mode:thread, model: default tier
    Clause-②: yes (widening)
    Metadata-protocol: widened
    Responsibility: objectstack: an AI blueprint field cannot say multiple / accept / maxSize, so apply_blueprint refuses a multi-file field | AI build users (cloud MCP) | "an expense claim with its e-invoices" builds as a single-file field or is refused
    Premise: holds at origin/main (seat read: BlueprintFieldSchema ~:323 declares none of the three; FieldSchema declares all three). Order: /mnt/project-files/spec-seat2/34275-delta.md (project share).
    Priority: p2 + pm:blocking (triage 6906488522; blocks cloud#4400).

  7. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-steve · session_01ADHkmTKhm2Pn8ghVWNkBbH
    os-dev-report

    {
      "issue": 34275,
      "status": "done",
      "branch": "claude/project-thread-233wkg",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34287",
      "session": "session_01ADHkmTKhm2Pn8ghVWNkBbH",
      "premise_still_valid": true,
      "head": "dbb037a8603a91ad571a0b3a3a4b64c4a3505c93",
      "summary": "BlueprintFieldSchema and StrictField gain multiple / accept / maxSize with FieldSchema's value shapes (strict side nullable; lenient multiple without .default(false), so a field omitting it parses as before). multiple:true is refused by name at ['multiple'] off FieldSchema's declarable set, now exported as multiDeclarableFieldTypes() (renamed from the module-private multiDeclarableTypeSet, body unchanged, FieldSchema behaviour unchanged), and on radio as FieldSchema refuses it. Added one rule the widening needed: a multi-value select takes no blueprint defaultValue (FieldSchema refuses the scalar on the built field), refused by name at ['defaultValue']. accept/maxSize follow FieldSchema (not refused off-media); describes say 'Read only on the media family' and 'Carried into the built field by the applier'.",
      "tests": "head dbb037a86: pnpm --filter @objectstack/spec test -> Test Files 844 passed (844), Tests 27015 passed | 1 todo; spec typecheck VERDICT command-exit 0; solution-blueprint.test.ts 130/130 (10 new cases). Consumer: packages/lint validate-expressions.formula-one-hop.test.ts (reads BlueprintFieldSchema.shape) 13/13 after the full build. Ablation 1 (refuseUndeclarableMultiple call -> comment, ablation-replace anchor 1->0, restored blob == HEAD): 3 failed / 127 passed. Ablation 2 (multi-select default branch guard -> false): 1 failed / 129 passed. Suite imports src, no dist leg. Forced test edits: 10 strict fixtures + the defaultValue 'key missing' fixture gain multiple/accept/maxSize: null; no assertion changed.",
      "gates": "node scripts/pm/dispatch-gates.mjs --commands at dbb037a86: 113 derived; 106 exit 0 on first pass, 7 exit 3 (prerequisite: full build / unshallow fixture) re-run after `pnpm build --concurrency=2` (119/119, VERDICT command-exit 0) and a fetch of fixture 621a4876: all 7 exit 0. --ran reconcile: 113 derived, 113 run, 0 NOT-MEASURED, 0 UNRUN. check:generated --fix regenerated api-surface/data.json, export-origins/data.json, references/ai/solution-blueprint.mdx (authorable-surface/ai.json by build). check-changeset-no-major on the PR body offline: exit 0, LEVEL AXIS yes (widening) + added, minor. check-platform-checklist --changed-from origin/main exit 0. check:nul-bytes exit 0. CI on PR #34287 at report time: Lint & Repo Gates success, Type Check UI success, Build & E2E UI success, Test Core 4/8 success + 4 in_progress, Test UI in_progress (no failure).",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "line_budget": "357 changed lines (+332/-25, 8 files) under the 3000 human-merge threshold; no governed path",
      "files_changed": [
        ".changeset/34275-blueprint-field-multiple-accept-maxsize.md",
        "content/docs/references/ai/solution-blueprint.mdx",
        "packages/spec/api-surface/data.json",
        "packages/spec/authorable-surface/ai.json",
        "packages/spec/export-origins/data.json",
        "packages/spec/src/ai/solution-blueprint.test.ts",
        "packages/spec/src/ai/solution-blueprint.zod.ts",
        "packages/spec/src/data/field.zod.ts"
      ],
      "deviations": [
        "Metadata-protocol: the claim writes 'widened', outside the closed set added|narrowed|semantic|none (check-changeset-no-major reads it MALFORMED). PR body and changeset write 'added' (three new authorable keys). Please amend the claim line.",
        "Scope add, same card: the multi-value select defaultValue refusal in refuseUnfitDefaultValue. Without it the widening admits { type: select, multiple: true, defaultValue: 'open' }, which the built FieldSchema refuses (list contract) - legal to apply, illegal to stage.",
        "Renamed the module-private multiDeclarableTypeSet to the exported multiDeclarableFieldTypes (two internal call sites); docblock updated from 'package-internal on purpose' to name its one new reader."
      ],
      "mcp_calls": "5 — mcp__github__issue_read x3 (get, get_comments x2), mcp__github__pull_request_read x1 (get_check_runs), all reads; zero MCP writes (ToolSearch loads not counted)",
      "api_writes": "2 — fleet-write relay pr_create (PR #34287, assignees os-steve, read-back 8188 bytes identical); post-stamped os-dev-report comment on #34275. Plus git push (not REST).",
      "open_questions": [
        {
          "question": "Public name for the exported declarable-type set (seat's call)",
          "options": [
            "A multiDeclarableFieldTypes() - returns the read-only set; reads as a field-type set beside MULTI_CAPABLE_TYPES / FILE_REFERENCE_TYPES",
            "B multiDeclarableTypeSet() - the old internal name, zero rename",
            "C isMultiDeclarableFieldType(type) - predicate only; the refusal message needs the list, so a second export (the remedy list) would follow"
          ],
          "recommendation": "A, because the refusal message needs the list (rules out C as one export) and 'Field' disambiguates it in the data namespace; the PR ships A"
        }
      ],
      "carrier_finding": "Step 4: nothing in objectstack turns a blueprint field into an object field. git grep SolutionBlueprint/BlueprintField/apply_blueprint outside packages/spec: packages/lint (one test reads the shape), packages/cli/src/lint/metadata-eval.ts (comment naming an injected expansion seam), ui/packages/app-shell (replays proposals in chat history). cloud's applier (cloud#4400) is the only carrier; describes say 'carried into the built field by the applier'. Whether defaultValue's identical wording is true today lives in cloud code: NOT MEASURED from this repo (scope is objectstack only).",
      "cloud_4400_note": "cloud#4400 body: 'Blocked-by: objectstack-ai/objectstack#34275' (unblocks when PR #34287 merges and an installable @objectstack/spec carries it; probe: BlueprintFieldSchema.shape has multiple/accept/maxSize and { type: 'file', multiple: true } parses). Then one PR: bump the framework pin to the merge commit (or the release carrying spec minor), add multiple/accept/maxSize to the objectBodyWithSharing allow-list in the same commit, name them in the apply_blueprint description and the blueprint guide, re-read the build-prompt baseline (StrictField gains 3 required-nullable keys per field), and the claim/invoices end-to-end test.",
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: cloud#4400 · noted, not filed — transition window: cloud's undeclared-key refusal reads BlueprintFieldSchema.shape, so a pin bump alone admits the three keys while the applier allow-list still drops them; a multiple:true file field would build single-file with no feedback. cloud#4400 should take the pin bump and the allow-list together."
      ]
    }

    Stamped 2026-11-16T04:27Z.


    Generated by Claude Code

  8. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

    Claim amendment · #34275 · amends 6906525801 · 2026-11-16T04:28Z

    Metadata-protocol: added (the claim's widened is outside the closed set; three keys the field contract already declares are added to the blueprint field and its strict mirror). Everything else in the claim stands. The PR is #34287 on claude/project-thread-233wkg.

  9. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-steve · session_01ADHkmTKhm2Pn8ghVWNkBbH
    os-dev-report

    {
      "issue": 34275,
      "status": "done",
      "round": "review r1 fixes (record 6907437381)",
      "branch": "claude/project-thread-233wkg",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/34287",
      "session": "session_01ADHkmTKhm2Pn8ghVWNkBbH",
      "premise_still_valid": true,
      "head": "b8cd61943af04da53e3c3645e77eb28d90b2616e",
      "summary": "M1: refuseKindOnMultiValueSelect in refineBlueprintField refuses an option kind on a select with multiple:true, one issue per option at options.N.kind, FieldSchema's #23809 wording; pinned against FieldSchema (same paths); MULTIPLE_RULE gains the clause; changeset sentence, refuseUndeclarableMultiple docblock and field.zod.ts docblock narrowed to what is pinned. S1: changeset states the direct-parse FROM/TO. N1: pin that a stageField naming a multi-value select is refused at stageField. K was 17, so origin/main merged via os-regen-merge.sh; authorable-surface/ai.json regenerated from the merged tree; PR still 8 files.",
      "commits": "0dbf86fe fix (M1/S1/N1), 2f073725 reference page regen, cc5edaea merge origin/main, b8cd6194 authorable-surface regen",
      "tests": "head b8cd61943: spec test Test Files 844/844, Tests 27024 passed | 1 todo; spec typecheck green; lint consumer 13/13; blueprint suite 132/132 (2 new). Ablation 3: refuseKindOnMultiValueSelect call -> comment, anchor 1->0, 1 failed / 131 passed, restored blob == HEAD.",
      "gates": "after merge: pnpm install --frozen-lockfile, pnpm build --concurrency=2 119/119, check:generated 14/14 current. dispatch-gates --commands at b8cd61943: 113 derived, all 113 exit 0; --ran: 113 run, 0 NOT-MEASURED, 0 UNRUN. check-changeset-no-major on body r2 offline exit 0.",
      "pr_body": "r2 at /mnt/project-files/spec-seat2/34287-body-r2.md (adds the kind rule, 12 cases, ablation 3, S1 note, merge note) for the seat to patch",
      "line_budget": "432 changed lines (+407/-25, 8 files) vs 3000",
      "deviations": [],
      "mcp_calls": "0 this round",
      "api_writes": "1 — this report comment (post-stamped); plus git push",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": []
    }

    Stamped 2026-11-16T05:29Z.


    Generated by Claude Code

  10. objectstack-fleet commented on Nov 16, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#2 · os-steve · session_01ADHkmQjrEpxMVxEiDUJHqC

    Landed · #34275 via PR #34287 · 2026-11-16T07:10Z

    probe reading
    PR #34287 MERGED, merge commit 11770581a88f95705c3c3f4903aba4be5b50c715 at 2026-11-16T06:11Z
    card #34275 closed (by Fixes #34275)

    State: pm:dispatched removed and assignee cleared; the card is done. Unblocks cloud#4400 (repo:cloud#2): its pin bump and the applier allow-list for multiple / accept / maxSize land in one PR, and it re-reads the build-prompt baseline, because StrictField gains 3 nullable keys. The new export multiDeclarableFieldTypes() is in @objectstack/spec/data.

  11. removed
    pm:dispatched
    on Nov 16, 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

    domain:specpm:blockingpriority:p2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions