Repository navigation
docs(skills): an objectstack-data eval relabels a vendor field with fieldPatches, never by redeclaring it in fields - #30941
Conversation
…ield with fieldPatches Case 7 of objects-fields-relationships.json: an author wants HotCRM's crm_account.industry to read "Sector". The accept set requires fieldPatches on a defineObjectExtension in hotcrm.custom; it refuses industry redeclared in fields, which takes the field over. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibyYUF3Rw1uw6uU1yUy
|
domain:skills#2 · os-tesla · session_01L9qibz5RLVEYDFco93jZ7u Contract reviewServed-tier: ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Trying to break it:
Implemented-by: VERDICT: PASS |
…pelling on a picklist-bound field Contract review should-fixes on PR #30941: must_not_contain now refuses any `industry: Field.` redeclaration, not only the select one; the expected output states that HotCRM's industry takes its options from a picklist, so no options entry belongs on the patch. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibyYUF3Rw1uw6uU1yUy
|
domain:skills#2 · os-tesla · session_01L9qibz5RLVEYDFco93jZ7u Contract reviewServed-tier: Delta record on the earlier record for head 73639a7 (comment 6685496287): judges only what moved. Everything that record found right and did not move stands. What moved: fix commit 66ef62e ( ① Derived judgments
② Semver levelUnchanged: ③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS |
|
domain:skills#2 · os-tesla · session_01L9qibz5RLVEYDFco93jZ7u 维护者速读
席位意见:契约复审 PASS,两条建议修改都已补上,增量复审无发现。复审另查出技能里 席位核对ACCEPT · seat
|
Requested by Tesla · project thread
domain:skills#2 · os-tesla · session_01L9qibyYUF3Rw1uw6uU1yUy
Fixes #28804
Clause-②: no
Metadata-protocol: none
维护者速读
skills/objectstack-data/evals/objects-fields-relationships.json新增第 7 例:装了 HotCRM 后,作者想让crm_account.industry字段显示为 "Sector"。标准答案是在配对包hotcrm.custom里写defineObjectExtension({ extend: 'crm_account', fieldPatches: { industry: { label: 'Sector' } } });必含fieldPatches、hotcrm.custom、extend: 'crm_account'、label: 'Sector'、defineObjectExtension,禁含把industry在fields里重新声明(industry: Field.select()、overrides:、name: 'crm_account'。另加一条 changeset。技能正文零改动。fieldPatches,不要在fields里重声明",但没有任何评测覆盖它;以后为付 token 棘轮而删掉这段,什么都不会红。这一例让这条教学有了守门。skills/objectstack-data/evals/objects-fields-relationships.json第 7 例(expected_output的每句都对照main上SKILL.md〈Object Extension Model〉与packages/objectql/src/registry.ts的patchedField写成);.changeset/28804-data-eval-field-patches.md。node scripts/check-skills-token-ratchet.mjs,预期skills/objectstack-data/evals/objects-fields-relationships.json is 2150 tokens — eval fixture, measured but not ratcheted,skills/objectstack-data/SKILL.md is 6087 tokens (ceiling 6123)不变;再grep -c "label: 'Sector'" skills/objectstack-data/SKILL.md得 1,证明每个必含 token 都在技能里教过。skills/**(Tier H),需要受管审批人在 GitHub 上 Approve 一次;之后席位落地。What changes
skills/objectstack-data/evals/objects-fields-relationships.json: case 7, appended after case 5'scrm_accountextension (the fixture whose topic cluster holds object extensions;hooks-security-seeds-datasources.jsonhas no extension case).crm_accountobject'sindustryfield should read "Sector" instead of "Industry", without touching HotCRM's source.defineObjectExtension({ extend: 'crm_account', fieldPatches: { industry: { label: 'Sector' } } })authored inhotcrm.customand registered inobjectExtensions; a patch carries display keys only (label,description,inlineHelpText,placeholder), the field's type, values and rules stay HotCRM's, a tenant-edited key keeps the tenant's text; never redeclareindustryinfields(takes the field over, cuts it off from upgrades, and an unsuffixed field in a.customextension is refused anyway); an option's label rides the same patch keyed by the option's storedvalueonly for a field with its ownoptions, apicklist-bound field's options are never patchable, a patch naming a field or option value the target lacks is refused at install and byos validate.must_contain:hotcrm.custom,defineObjectExtension,extend: 'crm_account',fieldPatches,label: 'Sector'. Each appears as a whole token inskills/objectstack-data/SKILL.mdonmain(1, 2, 1, 4, 1 hits; checked with theIDENT_CHARboundary rule ofui/scripts/check-skill-eval-tokens.mjs, whose own population isskills/objectuionly, so the check for this bundle is by hand).must_not_contain:industry: Field.select((the take-over spelling: HotCRM's field isField.select),overrides:(replacing the object whole),name: 'crm_account'(redeclaring the object). None names a mechanism a right contrasting answer must spell..changeset/28804-data-eval-field-patches.md:'@objectstack/skills': patch, both declaration lines.Every sentence of the expected output states what
maindoes:skills/objectstack-data/SKILL.md〈Object Extension Model〉 (the whitelist, the take-over rule, the__crefusal, the picklist rule),packages/spec/src/data/object.zod.ts(FieldDisplayPatchSchema,refuseFieldPatchOfReplacedField,fieldPatchesDescription),packages/objectql/src/registry.tspatchedField(the picklist-boundoptionsskip),packages/metadata-core/src/extension-field-patch-targets.ts(thefield/option/picklist-optionmisses the install door andos validaterefuse by).Readings (os-dev rule for
skills/**):origin/main4d56914a)skills/objectstack-data/evals/objects-fields-relationships.jsonlinescheck-skills-token-ratchet, eval fixture: measured, not ratcheted)skills/objectstack-data/SKILL.mdlines / tokensskills/*/SKILL.md, linesNo ceiling row moves; no skill text is added or deleted.
Why
#28804: an out-of-scope finding of PR #28795 (card #28730, which added the
fieldPatchesparagraph and is closed completed). With no eval, a later trim made to pay the token ratchet could drop the paragraph and nothing would fail. Evals sit outside the ratchet (ruling record 6513306068 B), so the case costs no skill text.Tests
No runtime code changes. The fixture parses as JSON (7 cases, ids 1–7); the case's own
expected_outputcontains everymust_containtoken and none of themust_not_containtokens (self-check script in the thread).Acceptance notes
skills/objectstack-data/evals/has no runner in this repo; the fixture is parsed as JSON and measured bycheck-skills-token-ratchet(population 1b). The CI eval-token gate (ui/scripts/check-skill-eval-tokens.mjs) walksskills/objectuionly, so the whole-token teaching check for this bundle was done by hand and is recorded above.fieldPatches: { industry: { label: 'Sector', options: { technology: { label: 'Tech' } } } }(SKILL.mdline 364, and the same example infieldPatchesDescription()ofpackages/spec/src/data/object.zod.ts) patches an option ofcrm_account.industry, which in HotCRM isField.select({ picklist: 'industry' })(hotcrmsrc/sales/objects/account.object.ts). Apicklist-bound field's options are never patchable, so an author who copies the example against the real HotCRM is refused byos validateand the install door with thepicklist-optionmiss (extension-field-patch-targets.ts). The eval's expected output therefore keeps theoptionsform conditional ("only for a field that declares its ownoptions"). Reach read off the judge's code path, not measured live.references/examples-objects.md) and docs(skills): the objectstack-data field-types formula row says a formula is no dataset or cube dimension (group key) either #30921 (rules/field-types.md) touch other files; seat 1's Bare-name phase 2: the published authoring skills teach one rule, every metadata name carries the namespace (ruling C on #30798) #30805 declaresskills/**wide.origin/main(4d56914a) had not moved at push time, so there was nothing to merge; a later move is merged on the next look.Verification
Derived with
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackagainst the two-file diff at73639a7c(branch baseorigin/main4d56914a, unchanged at push time, so no merge was needed). Every line run with stdin closed, exit codes landed on disk first: 40 derived families, 40 run, 40 exit 0;dispatch-gates --ranreconciliation:40 derived, 40 run, 0 NOT-MEASURED, 0 UNRUN. Ran list:skills-seat-2/out/28804-gates-ran-73639a7c.listin the project files.Gate readings at 73639a7
check-skills-token-ratchet:skills/objectstack-data/evals/objects-fields-relationships.json is 2150 tokens — eval fixture, measured but not ratcheted;skills/objectstack-data/SKILL.md is 6087 tokens (ceiling 6123; headroom 36), unchanged;57 authored bundle file(s) within their ceilings, exit 0.check:skill-identifier-liveness,check:skill-compatibility,check:skill-frame-sync,check-empty-changeset --base origin/main,check-changeset-no-major --base origin/main,check-adr-0087-registration --base origin/main,check:pm-governed-merges,check:doc-authoring,check:nul-bytes,check:role-word,check-closing-keyword-parity,check-comment-mask-corpus, the rest of the 34 no-build families: exit 0../packages/**under the verify lock (VERDICT command-exit 0, 7m27s):check:dual-build-cjs-loads(116 published require entry point(s) across 71 package(s) load; 2456 emitted CommonJS file(s) parse),check:lean-entry-closure,check:dts-closure(241/241 declared declaration file(s) present),check:published-files,check:sourcemap-no-sources-content,@objectstack/lint check:doc-formula-expressions: exit 0.ui/scripts/check-skill-eval-tokens.mjs: exit 0 (Every must_contain token is taught by its own skill bundle; populationskills/objectuionly, see Acceptance notes).dispatch-gates --tieron the two paths:skills/**clause ①,claude-fable-5-1mandated, no one-line exit; this thread runs on it.check-governed-merges --teston the two paths: Tier H.CI families (
Lint & Repo Gates,Test Core, the rest) are the PR's check-runs, not re-run locally.Human Minimum
packages/specholds no runtime logic.pnpm lintis CI's run (no source file in the diff).main, one pull request.packages/specnot touched.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibyYUF3Rw1uw6uU1yUy