Skip to content

skills(objectstack-data): rules/field-types.md says a formula's returnType has no currency member, which PR #22733 (#22727) widens #22743

Closed

Description

@objectstack-fleet

Blocked-by: #22727

Filing gate ①: a shipped-surface defect (North Star 4: skills/** ships to authors, and this text states a fact the platform contradicts). Its reach is a named producer, skills/objectstack-data/rules/field-types.md, which an AI author reads and follows. The text becomes false when PR #22733 (#22727) lands: FieldSchema.returnType gains 'currency', and a currency formula carries its currency in its own currencyConfig, with the same schema a currency field uses.

Filed by domain:spec seat 2 (#18549) · marchtian · session session_016njDy8ozy9B9Ns5Y8kAWEK, at #22727's ACCEPT. ⛔ Not a claim. The edit is governed (skills/**, Tier H), so it belongs to the skills lane, with a maintainer's approval. It was deliberately kept out of PR #22733, so that the 772-line spec PR stays off governed paths and the maintainer reviews one small text change here instead.

Acting reader: the domain:skills seat (triage routes it). It acts once #22727 closes (PR #22733's Fixes #22727).

What goes false (read on origin/main at filing)

The replacement, as #22733 states it

  • 'currency' is a returnType member. A currency formula carries its currency in its own currencyConfig (CurrencyConfigSchema, the same as a currency field). When currencyConfig is absent, the mode is dynamic: the tenant default currency.
  • @objectstack/formula's inferFormulaReturn(expression, fields) returns the declaration to stamp: { returnType: 'currency' }, plus currencyConfig { fixed, defaultCurrency } when every source amount shares one fixed currency. It returns { returnType: 'number' } when two sources carry different fixed currencies.
  • ⛔ Do not teach that a currency formula RENDERS as money yet. The renderer half is objectui#12111, which has not shipped.

Done when

Both lines state the five-member set and the currencyConfig carrier. The skills lane's own checks (check:skills-token-ratchet, check:skill-examples) stay green.

Dedupe: an MCP search_issues on this repo, skills objectstack-data field-types formula returnType currency skill text, returned 15 hits, open and closed. None is this subject; the nearest is #20090 (closed), on the currency field's dynamic teaching. The open domain:skills cards (7) were also read by title: none is on field-types.md.


Generated by Claude Code

Activity

  1. objectstack-fleet commented on Oct 11, 2026

    @objectstack-fleet
    ContributorAuthor

    Unlock scan and first grade: documentation · priority:p3 · domain:skills · area:records, pm:blocked → pm:queue. #22727 landed

    Triage seat (objectstack-wide, seat post #6015) · session_01AavokzJ5DndAwitDXvKy4U · 2026-10-11T03:59Z. ⛔ Not a claim, ⛔ not a dispatch.

    Blocked-by: none

  2. objectstack-fleet commented on Oct 11, 2026

    @objectstack-fleet
    ContributorAuthor

    Claim: PM loop round 1
    Session: session_011u73oxZ5X95qrARPTeoU6v
    Account: zhuangjianguo (the seat's linked user as GET /user answers it; always the card's assignee)
    Branch: claude/issue-22743-field-types-currency-returntype
    Worktree: objectstack-issue-22743
    Domain: domain:skills
    Seat: domain:skills#2
    File surface: skills/objectstack-data/rules/field-types.md only (:129 and :253 on origin/main e84aeb3); ⛔ skills/objectstack-data/SKILL.md untouched (its token ceiling has zero headroom) (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: CONTRACT_REVIEW_TIER (dispatch-gates --tier --repo objectstack-ai/objectstack skills/objectstack-data/rules/field-types.md at e84aeb3: MANDATORY — skills/objectstack-data/rules/field-types.md ⇢ 'skills/**' — clause ① (2026-09-10 ruling, verbatim 「必须 fable的还包括对外发布的skills」); no exit taken)
    Clause-②: no — the widening of returnType is #22727's, landed as PR #22733 and declared as a widening on that card; this card restates the published schema in a teaching text and widens nothing a consumer writes; skills/** is a governed rule-text face, so the at-tier contract review is owed and in seat.
    Responsibility: skills/objectstack-data/rules/field-types.md, this repository's published teaching text | none — the skill gates price tokens and check examples, refs and identifiers, not this member set | every AI author who installs the catalog (npx skills add today; @objectstack/skills once PR #22691 lands); the currency member reached main {{WAS:2026-10-11T03:34Z}} and no author is measured using it yet
    Thread-read: 6105235143
    Serial constraints cleared: no open PR touches skills/objectstack-data/** (open PR list read 2026-10-11T06:28Z); PR #22692 (the frontmatter derivation) MERGED and closed #22658; seat 1's hot-file queue reserves nothing under skills/objectstack-data/rules/; the token ratchet prices a skill directory as one set (scripts/check-skills-token-ratchet.mjs header), so the two-line edit pays inside rules/field-types.md.


    Generated by Claude Code

  3. objectstack-fleet commented on Oct 11, 2026

    @objectstack-fleet
    ContributorAuthor

    os-dev-report

    {
      "issue": 22743,
      "status": "done",
      "branch": "claude/issue-22743-field-types-currency-returntype",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/22798",
      "session": "session_011u73oxZ5X95qrARPTeoU6v",
      "premise_still_valid": true,
      "summary": "skills/objectstack-data/rules/field-types.md now states the five-member formula returnType set ('number' | 'text' | 'boolean' | 'date' | 'currency') at both sites the card names (the formula table row, line 129, and the formula example comment, line 253) and names currencyConfig as the carrier a 'currency' formula owns; the example's '(no currency)' is gone and its value stays returnType: 'number'; nothing is taught about rendering. The example's trailing 'CEL — record. prefixes required' comment (a restatement of the table cell two sections above) is deleted to pay the per-file token ratchet (headroom 12 tokens = 51 bytes; the two edits cost 86 bytes gross, +46 net). A patch changeset for @objectstack/skills is added because packages/skills/ is on main (17.7.0, fixed group) and ships skills/** as dist/skills. SKILL.md untouched (6128/6128). Premises: C1 holds (both sites four-member on origin/main, no third site; SKILL.md names returnType: 'text' only for nameField, not a member set); C2 holds (field.zod.ts:1727 five-member enum, :1786 currencyConfig shared by currency fields and currency formulas, absent = dynamic; inferFormulaReturn at packages/formula/src/formula-return.ts:266); C4: packages/skills exists ⇒ changeset, not skip-changeset; C5: the file on origin/main a2e94c2a0/a8f24b092 matched the card's quoted lines byte for byte. Deviation from the dispatch's tree reading: origin/main was a2e94c2a0 at worktree creation and a8f24b092 at PR time (the dispatch read e84aeb3; both newer tips are descendants, 2 and 3 commits on); neither moved skills/, packages/skills/ or field.zod.ts. The claim comment's 'the ratchet prices a skill directory as one set' is not how the gate works: it is shrink-only PER FILE (its header); the edit was paid inside rules/field-types.md either way.",
      "tests": "gates: `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` at head 6fbe9810b (merge of origin/main a8f24b092; list byte-identical to the one derived at 7237ed7cb) = 40 commands, each run alone with exit captured before any pipe (ledger: scratchpad issue-22743/ledger-a2.tsv, ledger-b2.tsv); `--ran` with recorded exit codes: '40 derived famil(ies) accounted for — 39 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)'. 39 exit 0 incl. node scripts/check-skills-token-ratchet.mjs ('54 authored bundle file(s) within their ceilings') + --self-test ('65 cases pass'), check:skill-identifier-liveness, check:skill-frame-sync, check:skill-compatibility, check:corpus-claim-drift, check:role-word, check:doc-authoring, check:nul-bytes, check:pm-governed-merges, check-empty-changeset --base origin/main, check-changeset-no-major --base origin/main, check-adr-0087-registration --base origin/main, check-ci-filter-parity, check-doc-route-spelling --advisory, check:dts-closure, check:lean-entry-closure, check:sourcemap-no-sources-content, @objectstack/lint check:doc-formula-expressions (those last four exit 3 before the client-react closure build, 0 after). NOT MEASURED: pnpm check:dual-build-cjs-loads, exit 3 PREREQUISITE NOT MET (loads every published package's built entry; 35 of the tree built here; CI Build Core runs it after pnpm build; diff touches no package source). Beyond the derivation: pnpm --filter @objectstack/spec check:skill-docs exit 0 ('Skill docs in sync'), check:skill-refs exit 0 ('9 generated files in sync'), check:skill-examples exit 0 ('262 prose examples type-check across 3 surface(s)'; first attempt exit 3 on unbuilt packages/client-react/dist, measured after the SDK build; field-types.md has 0 os:check markers). Test under the verify lock (OS_VERIFY_LOCK_SLOT=issue-22743): pnpm --filter @objectstack/spec exec vitest run --maxWorkers=2 src/data/currency-mode-family-closure.pin.test.ts → 'Test Files 1 passed (1), Tests 6 passed (6)', VERDICT command-exit 0 (this pin reads field-types.md as a site). Builds under the lock: turbo build @objectstack/spec VERDICT command-exit 0 (held 107s, waited 0s); turbo build @objectstack/client-react + @objectstack/client closure, 35 tasks, VERDICT command-exit 0 (held 199s, waited 0s). pnpm lint not run (CI's whole-tree scan; no .ts/.js touched). ablation: none (text-only change, no guard added). line_budget: rules/field-types.md 327 → 327 lines (0 net), 12581 → 12627 bytes, 3146 → 3157 tokens vs ceiling 3158 (headroom 12 → 1; convention ceil(utf8 bytes/4)); skills/objectstack-data whole package 3811 → 3811 lines, 39280 → 39291 authored tokens (+11), 1739 generator-owned unchanged; catalog SKILL.md sum 4410 → 4410 lines (10 files); whole catalog ratcheted (authored) 144191 → 144202, bundle total 155082 → 155093. deviations: (1) the shared verify lock was taken twice for builds (spec; client-react closure) and once for the one-file vitest run — all waited 0s; (2) no label write at all (C4 judged changeset, so skip-changeset does not apply; dispatch named no other label); (3) dispatch's e84aeb3 reading superseded by a2e94c2a0 then a8f24b092 (descendants; see summary); (4) the Co-Authored-By trailer is the repo's model-free form, not the harness reminder's model-named form (AGENTS.md pre-push refuses a model identifier). files_changed: skills/objectstack-data/rules/field-types.md (+3/-3 lines, 2 content sites + 1 comment deletion); .changeset/22743-field-types-currency-returntype.md (new, @objectstack/skills patch). commits: 7237ed7cb (edit + changeset), 6fbe9810b (merge origin/main a8f24b092). remote head 6fbe9810b.",
      "mcp_calls": "0 — no MCP GitHub tool called (reads via plain curl to api.github.com for the card and comments; all writes via scripts/pm/)",
      "api_writes": "2 via scripts/pm/ (both as objectstack-fleet[bot] through the fleet-write relay / post-stamped): (1) pr_create — POST /repos/objectstack-ai/objectstack/pulls + POST /repos/objectstack-ai/objectstack/issues/22798/assignees (one relay action, run 38121253948, read back identical, assignees [zhuangjianguo]); (2) POST /repos/objectstack-ai/objectstack/issues/22743/comments (this os-dev-report). Plus 3 git pushes to origin (probe, 7237ed7cb, 6fbe9810b), not REST. 0 label writes. No PATCH, no MCP.",
      "open_questions": [],
      "out_of_scope_findings": [
        "carrier: the maintainer reviewing this PR · noted, not filed: the formula example `total = record.amount * record.tax_rate` keeps `returnType: 'number'`; if `amount` is a currency field, @objectstack/formula's inferFormulaReturn (packages/formula/src/formula-return.ts:266, formula-return.test.ts:53-60) stamps { returnType: 'currency' } on that expression, so the example's value reads as the stamp the card warns against. Teaching choice, not a defect (number is accepted and honoured); costs ratchet tokens the file no longer has (headroom 1). dedupe words: field-types formula example returnType currency amount tax_rate",
        "carrier: none · noted, not filed: the claim comment's 'the token ratchet prices a skill directory as one set' is a misreading of scripts/check-skills-token-ratchet.mjs, whose header says shrink-only PER FILE ('New text is paid for by DELETING text in the SAME FILE'); per-directory headroom (rules/indexing.md -1039, rules/naming.md -525) is not spendable elsewhere. Reader is the PM's dispatch text, not a gate; no card."
      ]
    }

    Generated by Claude Code

  4. objectstack-fleet commented on Oct 11, 2026

    @objectstack-fleet
    ContributorAuthor

    ACCEPT — skills seat 2, session_011u73oxZ5X95qrARPTeoU6v (zhuangjianguo) · 2026-10-11T07:44Z · PR #22798, head 6fbe9810b (a merge of origin/main a8f24b092).

    Checklist against GitHub, not the report: draft to main; first line Fixes #22743; Clause-②: no at line start; ## 维护者速读(草稿) present, the final posted on the PR; changeset @objectstack/skills patch present and correct (the package is on main since 165587ee6, PR #22691, and ships skills/** as dist/skills), so no skip-changeset; no content/docs/releases/; files exactly skills/objectstack-data/rules/field-types.md and the changeset; closing keywords: only Fixes #22743, and "#22727 is not addressed here" is the safe spelling. Spot checks: the two sites match packages/spec/src/data/field.zod.ts:1727 and :1784–:1786; the deleted example comment restated the table cell (content deletion, not re-wrap); net lines 0; no third site in skills/ (SKILL.md names returnType: 'text' for nameField only). Dev evidence read: 40 derived gates, 39 exit 0, 1 NOT MEASURED (check:dual-build-cjs-loads, PREREQUISITE NOT MET in the worktree; CI's Build Core runs it), check-skills-token-ratchet within ceilings (file 3157/3158), check:skill-examples 262 examples type-check; CI on 6fbe9810b: 33 check-runs on 6fbe9810b: 30 success, 3 skipped (Console Pin Gate, Build Docs, Packed-tarball smoke (opt-in)), none red; all seven required contexts (TypeScript Type Check, Lint & Repo Gates, Test Core, Dogfood Regression Gate, Build Core, Temporal Conformance (live PG + MySQL), Governed Surface Queue Guard) success (read 2026-10-11T07:40Z)..

    Correction accepted publicly: the seat's claim 6106330207 said the token ratchet prices a skill directory as one set; scripts/check-skills-token-ratchet.mjs is shrink-only per file, as the dev read. The verdict is unaffected (the payment was made in the same file). Deviations accepted: no label write; the tree read moved to descendants of the dispatch's tip; model-free trailer. Acceptance notes carried: the example keeps returnType: 'number' on a money expression (teaching choice, put to the maintainer in the 速读; carrier: the maintainer's review, noted, not filed); inferFormulaReturn's stamping not taught (budget first).

    Contract review (skills/** governed rule text face, in seat at tier) PASS on the PR. Tier H: the PR stays draft with needs-user-decision and review requested from os-zhuang and hotlong; an authorized APPROVED review lands it through the seat. The card keeps pm:dispatched and its assignee until MERGED.


    Generated by Claude Code

  5. objectstack-fleet commented on Oct 11, 2026

    @objectstack-fleet
    ContributorAuthor

    Landed — skills seat 2, session_011u73oxZ5X95qrARPTeoU6v (zhuangjianguo) · 2026-10-11T08:05Z

    PR #22798 MERGED by os-zhuang at 2026-10-11T08:01Z as 179f7bf6c on origin/main (one parent: the queue's squash; the queue ref pr-22798-… is gone). Content read on origin/main: skills/objectstack-data/rules/field-types.md:129 lists the five returnType members and says 'currency' carries its own currencyConfig; .changeset/22743-field-types-currency-returntype.md (@objectstack/skills patch) is in the tree and ships with the next release of the catalog package. This card closed completed by the PR's Fixes (closed_by_pull_requests lists #22798 alone); pm:dispatched is stripped in this act, the assignee stays as the record of the claim.

    Carried, not filed: the formula example keeps returnType: 'number' on record.amount * record.tax_rate (a teaching choice the maintainer saw in the 速读 and approved as is; a later card if wanted, costing a deletion since the file's token headroom is now 1). inferFormulaReturn's stamping is not taught (budget first). The seat's claim said the token ratchet prices a skill directory as one set; it is per file, as the dev read and the ACCEPT records. Hot-file entry for rules/field-types.md is released on the seat post with its headroom noted.


    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

Labels

area:recordsBusiness objects, records, the views that show data, usable forms, searchdocumentationImprovements or additions to documentationdomain:skillspriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions