Skip to content

A formula field an object extension adds that reads itself, or two that read each other, is refused at neither the publish door nor os build #33153

Closed

Description

@objectstack-fleet

domain:spec#2 · os-tesla · session_01L9qibvfX5bawZKtfa6u7j9

Filing gate: ③ a follow-up a contract review surfaced (delta record 6864935727 on PR #33119, #33072, question 4).
Business reason: a computed field that depends on itself cannot be evaluated. An author who ships one in an object extension gets no refusal in Studio or in os build, so the loop only shows when records are read or written. A cycle among an object's own formula fields is refused today (#33108); one an extension adds is not.
Reader who acts: the owner of packages/lint formula-cycle-issues.ts (#33108) and the extension walk (#32875).

维护者速读

#33108 的公式循环检查只在对象遍历里跑;对象扩展加的公式字段如果引用自己,或两个互相引用,发布门和 os build 都不拒。两边一致,所以不是 #33119 的问题,需要把循环检查也接到扩展遍历上。

Measured (reviewer probe at ac6dd79d)

  • An extension adding a__c: formula 'record.a__c' → 0 findings at the extension door and in the build.
  • An extension adding a__c: formula 'record.b__c' and b__c: formula 'record.a__c' → 0 findings at both.
  • A cycle that closes through a declared formula of the object is named by the build at the declared member.

Expected

The formula-cycle member judges the object as served, own fields plus every extension's added fields, at both the build and the object_extension door, and locates a finding at the extension's field.

Dedupe

repo:objectstack-ai/objectstack is:issue is:open formula cycle extension checked at filing. Related: #33108, #32875, #33072.

⛔ Not a claim. Grading is triage's.

Activity

  1. objectstack-fleet commented on Nov 13, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Path: none

    Triage: first touch → domain:spec · p3 · pm:queue · 2026-11-13T21:48Z

    ⛔ Not a claim.

  2. added
    domain:spec
    pm:queue
    on Nov 13, 2026
  3. objectstack-fleet commented on Nov 14, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

    Claim: PM loop round 1 · 2026-11-14T20:06Z
    Session: session_01FEkQ5mswnWm181XgYcCUag (seat); card thread session_01FEkQ5mAXtyZgMs9QwfQzXE is the dev
    Account: os-project-manager
    Branch: claude/project-thread-j2hlfl (the card thread's designated branch; the platform lets a thread push only that branch, so not claude/issue-33153-*)
    Worktree: objectstack-issue-33153
    Domain: domain:spec
    Seat: domain:spec#1
    File surface: packages/lint/src/formula-cycle-issues.ts, packages/lint/src/validate-expressions.ts (formula walk call site only), packages/lint/src/authoring-rules.ts and validate-security-posture.runtime-surface.test.ts only if the door needs the rule, tests, one ADR-0087 semantic entry under packages/spec/src/migrations/entries/semantic/, content/docs/deployment/validating-metadata.mdx if it lists the extension door's checks, root .changeset/ (stop on breach; explain in the report)
    Container & model: S, mode:thread, model: default tier, effort: medium
    Clause-②: no (narrowing)
    Metadata-protocol: narrowed
    Responsibility: the formula-cycle member (#33108) runs on the object walk only, so an extension's added formula fields never reach it
    Thread-read: 6865769873
    Premise: holds at origin/main fc283d6d: formulaCycleIssues is called once, from the object walk in validate-expressions.ts; the reviewer probe on the card (self-reference and a two-field cycle in one extension) found 0 findings at both doors. Taken under the maintainer's standing order 「p1 p2 处理完了,就可以处理 p3」 (2026-10-26; Ruling-ref): the lane's only queued p2 (#33246) is dispatched. Order: /mnt/project-files/pm-orders/spec/order-33153.md (project share).
    Serial constraints cleared: #33216/#33217 (PR #33398, the extension walk) merged at 2026-11-14T20:03Z. #33246 runs beside it in the same file's gate-setup region (~:2378); this card stays in the formula walk; whichever lands second merges origin/main.

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

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5mAXtyZgMs9QwfQzXE
    os-dev-report
    {
    "issue": 33153,
    "status": "done",
    "branch": "claude/project-thread-j2hlfl",
    "pr": "#33442",
    "session": "session_01FEkQ5mAXtyZgMs9QwfQzXE",
    "premise_still_valid": true,
    "summary": "Premise held at fc283d6: formulaCycleIssues ran on the object walk only and reported declared names, so the card's probe (self-reference, two-field cycle) got 0 findings at the build and the object_extension door (5 of 12 new pins red over the base sources). The extension walk in validate-expressions.ts now runs the cycle pass once per target over the fieldDefs it already builds (objectsAsServed, ties dropped; no second fold), reporting each member an entry adds at that entry (new extensionFormulaLoci in formula-cycle-issues.ts) and leaving declared members to the object walk, so a cycle closing through a declared formula keeps its object location and is named once. validateStackExpressions was already on the object_extension door (#33072), so authoring-rules.ts and the roster pins did not move; the door never reports a target-declared member, so a target's own cycle is not charged to the extension write. ADR-0087 semantic entry object-extension-formula-cycle-refused, changeset lint+spec minor with both declaration lines and Skills-docs, one sentence in validating-metadata.mdx.",
    "tests": "head 67ff848. lint runtime-gate.object-formula-cycle.test.ts new describe #33153: 7 cases; base-source red leg (git restore --source=fc283d6d of the two lint src files) 5/12 red, restored clean. runtime meta-object-extension-item.test.ts new describe [#33153]: 3 cases through saveMetaItem+publishMetaItem (422 INVALID_METADATA, build where/path on each member, field not served, row stays draft; chain publishes); file 46/46. Full @objectstack/lint test 210/210 files, 8978/8978 (lock VERDICT command-exit 0); lint typecheck and runtime typecheck exit 0; spec src/migrations 5 files 198/198; eslint on the 5 changed ts files exit 0. Ablation A1 (report scoping dropped, src): 5/12 red incl. the differential and the declared-member case; tool restore verdict blob==HEAD. Ablation A2 (extension loci emptied behind a globalThis marker, dist): lint rebuilt, ablation-dist-preflight marker in 4 built files, runtime -t 33153 2 red 1 green; restore leg rebuilt, --absent 0 of 20 files, tree clean, 3/3 green.",
    "gates": "dispatch-gates --commands at 67ff848: 109 lines (108 at 1b184b7; the runtime test adds pnpm check:route-envelope). Run after a whole-repo pnpm build (lock VERDICT command-exit 0, 9m22s). 108 exit 0 first pass; node scripts/check-plugin-teardown-shape.mjs --self-test exit 3 (fixture commit absent from shallow clone) then exit 0 after git fetch --depth=1 of 621a487. dispatch-gates --ran: 109 derived, 109 run, 0 NOT-MEASURED, 0 UNRUN. Record: project share pm-orders/spec/33153-gates-ran.txt. CI check-runs on PR #33442: in_progress at report time.",
    "dogfood_battery": "67ff848e · os-verify-lock: VERDICT command-exit 0 · held the lock 1703s · Test Files 465 passed, 3 skipped (468) · Tests 3932 passed, 42 skipped (3974) · no failures",
    "mcp_calls": "0 — no GitHub MCP calls (reads via gh api REST GET)",
    "api_writes": "2 — relay pr_create (repository_dispatch, run 43641885813, PR #33442, no labels, no assignees) and this os-dev-report comment via post-stamped.mjs on #33153; plus git push (not a REST write)",
    "deviations": "No labels sent: the order names none and the relay refuses an empty list. No assignees per the order and AGENTS.md (os-dev.md rule 2 reads the other way; order followed). origin/main moved to 4ace1fa after the branch point; git diff --stat fc283d6 4ace1fa over packages/lint, the runtime test file and the docs page is empty, so no merge (precedent PR #33398). File surface: packages/runtime/src/domains/meta-object-extension-item.test.ts is a test, inside the order's 'tests' line.",
    "files_changed": [
    ".changeset/33153-extension-formula-cycle.md",
    "content/docs/deployment/validating-metadata.mdx",
    "packages/lint/src/formula-cycle-issues.ts",
    "packages/lint/src/runtime-gate.object-formula-cycle.test.ts",
    "packages/lint/src/validate-expressions.ts",
    "packages/runtime/src/domains/meta-object-extension-item.test.ts",
    "packages/spec/src/migrations/entries/semantic/18.object-extension-formula-cycle-refused.ts"
    ],
    "line_budget": "7 files, +243/-5 (git diff --shortstat fc283d6 67ff848); under the 3000 human-merge threshold",
    "open_questions": [],
    "security_findings": "none",
    "out_of_scope_findings": [
    "carrier: none · noted in PR Acceptance notes, not filed: at the object_extension door a cycle member whose name the target also declares (an extension redeclaring a declared field) is left to the object walk, which the door's one pass skips; such redeclarations beyond display properties are refused at the module save door (ADR-0146 D10)."
    ]
    }


    Generated by Claude Code

  6. objectstack-fleet commented on Nov 14, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5mAXtyZgMs9QwfQzXE
    os-dev-report
    {
    "issue": 33153,
    "status": "done",
    "branch": "claude/project-thread-j2hlfl",
    "pr": "#33442",
    "session": "session_01FEkQ5mAXtyZgMs9QwfQzXE",
    "premise_still_valid": true,
    "summary": "Review round 1 on contract review 6884435411 (head 67ff848 -> 7c2eeb8, commits 88b22a1 and 7c2eeb8). Finding 1 (should-fix): on the object_extension write the extension walk now leaves no name out of the cycle report (ownNames is empty when extensionWrite): the written entry is folded over the target as served before the write, so every name it adds is served from its own record. Shapes (a) an extension re-declaring a field the target declares and (b) an entry re-adding a name a sibling package's published extension serves are refused at the door at the entry; the build keeps leaving the authored target's declared names to the object walk. The target's own cycle, a sibling's stored cycle and a formula that only reads a cycle stay uncharged. Findings 2 and 3 (nits): the tie exception is stated in the semantic entry (reason, acceptanceCriteria) and the changeset's Unchanged list; the call-site comment now describes both branches (declared target: tie left out; undeclared: later entry's definition); extensionFormulaLoci's parameter is renamed left and its jsdoc says what the build and the door pass. Docs sentence updated. Revised PR body (D10 sentence corrected, round-1 tests, ablations and verification) at pm-orders/spec/33153-pr-body-r1.md for the seat to write.",
    "tests": "head 7c2eeb8. runtime-gate.object-formula-cycle.test.ts #33153 describe now 10 cases (+ shape a, shape b, sibling-stored-cycle differential). Over the 67ff848 lint sources: 2 of 15 red (shapes a and b), restored clean. Ablation A3 via ablation-replace: base && !extensionWrite -> base: 2/15 red (a, b); build-side exclusion emptied behind a globalThis marker: 1 red (shape a's build assertion, member named twice); both restored by the tool's verdict. @objectstack/lint 210/210 files 8981/8981 and lint typecheck exit 0; runtime meta-object-extension-item.test.ts 46/46; spec src/migrations 198/198; eslint on changed ts files exit 0 (all under lock VERDICT command-exit 0).",
    "gates": "dispatch-gates --commands at 7c2eeb8: 109 lines, identical to 67ff848's. Run after a whole-repo pnpm build of 7c2eeb8 (lock VERDICT command-exit 0): all 109 exit 0. --ran: 109 derived, 109 run, 0 NOT-MEASURED. Record pm-orders/spec/33153-gates-ran-r1.txt. CI check-runs on 7c2eeb8: not read at report time.",
    "dogfood_battery": "7c2eeb88 · os-verify-lock: VERDICT command-exit 0 · held the lock 1645s · Test Files 465 passed, 3 skipped (468) · Tests 3932 passed, 42 skipped (3974) · no failures",
    "mcp_calls": "0",
    "api_writes": "1 this round — this delta os-dev-report comment via post-stamped.mjs on #33153; plus git push (not a REST write). Round total 3.",
    "deviations": "PR body not edited by the dev (os-dev rule: the seat writes it); the corrected body is in the project share. origin/main moved to b392ff7; vs fc283d6 it touches only another entry file under packages/spec/src/migrations, none of this PR's files, so no merge; #33246 (PR #33434) not merged at hand-back.",
    "files_changed": [
    ".changeset/33153-extension-formula-cycle.md",
    "content/docs/deployment/validating-metadata.mdx",
    "packages/lint/src/formula-cycle-issues.ts",
    "packages/lint/src/runtime-gate.object-formula-cycle.test.ts",
    "packages/lint/src/validate-expressions.ts",
    "packages/runtime/src/domains/meta-object-extension-item.test.ts",
    "packages/spec/src/migrations/entries/semantic/18.object-extension-formula-cycle-refused.ts"
    ],
    "line_budget": "7 files, +305/-5 (git diff --shortstat fc283d6 7c2eeb8)",
    "open_questions": [],
    "security_findings": "none",
    "out_of_scope_findings": []
    }


    Generated by Claude Code

  7. objectstack-fleet commented on Nov 14, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5mAXtyZgMs9QwfQzXE
    os-dev-report
    {
    "issue": 33153,
    "status": "done",
    "branch": "claude/project-thread-j2hlfl",
    "pr": "#33442",
    "session": "session_01FEkQ5mAXtyZgMs9QwfQzXE",
    "premise_still_valid": true,
    "summary": "Review round 2 on delta review 6885259034 (head 7c2eeb8 -> bfa139b, one commit). Per the seat's ruling, no behaviour change. Finding 1: the tie exception is scoped to os build on a declared target (an undeclared target's tie IS judged, later entry's definition), and the door's reading is stated in the semantic entry (reason, acceptanceCriteria), the changeset's Unchanged list, the call-site comment, extensionFormulaLoci's jsdoc and the docs sentence: the door judges the written entry's own definition of every name it adds, so it can refuse a tie or an outranked entry the build lets through (follow-up #33494, named in the comment and the pin). New door pin: a tie (200/200) and an outranked entry (sibling 300, written 200) are each refused at the door at the entry while the build returns no cycle finding. Finding 2: corrected PR body at pm-orders/spec/33153-pr-body-r2.md (16 cases in the file, 11 in the describe, extensionFormulaLoci(target, entries, left), round-2 notes and verification).",
    "tests": "head bfa139b. runtime-gate.object-formula-cycle.test.ts 16/16 (#33153 describe 11). Ablation A4 via ablation-replace (door guard base && !extensionWrite -> base): 3/16 red (shapes a, b and the tie/outranked pin), restored by the tool's verdict. @objectstack/lint 210/210 files 8982/8982 and lint typecheck exit 0; runtime meta-object-extension-item.test.ts 46/46; spec src/migrations 198/198; eslint on changed ts files exit 0 (lock VERDICT command-exit 0).",
    "gates": "dispatch-gates --commands at bfa139b: 109 lines, same list as earlier rounds. After a whole-repo pnpm build of bfa139b: all 109 exit 0. --ran: 109 derived, 109 run, 0 NOT-MEASURED. Record pm-orders/spec/33153-gates-ran-r2.txt. CI check-runs on bfa139b: not read at report time.",
    "dogfood_battery": "bfa139ba · os-verify-lock: VERDICT command-exit 0 · held the lock 1601s · Test Files 465 passed, 3 skipped (468) · Tests 3932 passed, 42 skipped (3974) · no failures",
    "mcp_calls": "0",
    "api_writes": "1 this round — this delta os-dev-report comment via post-stamped.mjs on #33153; plus git push (not a REST write). Total across rounds 4.",
    "deviations": "PR body not edited by the dev; corrected body in the project share for the seat. origin/main at 811b976 has no change to any file this PR touches vs fc283d6, so no merge; #33246 (PR #33434) not merged at hand-back.",
    "files_changed": [
    ".changeset/33153-extension-formula-cycle.md",
    "content/docs/deployment/validating-metadata.mdx",
    "packages/lint/src/formula-cycle-issues.ts",
    "packages/lint/src/runtime-gate.object-formula-cycle.test.ts",
    "packages/lint/src/validate-expressions.ts",
    "packages/runtime/src/domains/meta-object-extension-item.test.ts",
    "packages/spec/src/migrations/entries/semantic/18.object-extension-formula-cycle-refused.ts"
    ],
    "line_budget": "7 files, +341/-5 (git diff --shortstat fc283d6 bfa139b)",
    "open_questions": [],
    "security_findings": "none",
    "out_of_scope_findings": []
    }


    Generated by Claude Code

  8. objectstack-fleet commented on Nov 14, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:spec#1 · os-project-manager · session_01FEkQ5mswnWm181XgYcCUag

    ACCEPT → PR #33442 comment 6886066248 (ready + auto-merge, 2026-11-14T23:43Z).

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

Metadata

Metadata

Labels

domain:specpm:dispatchedpriority:p3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions