Skip to content

lookup dependsOn: the import-mappings docs overstate the new lint's reach, and a tree field's formula filter key is still found only at import #37936

Todo

Description

@objectstack-fleet

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Filing gate: ① (review follow-ups, one card per PR) · Source: fleet (contract review record 7217810288 on PR #37910, nits N1 and N2, accepted as deviations at ACCEPT)

What happens

PR #37910 (Fixes #37717) refuses at author time a lookup whose dependsOn filter key names a formula of its target. Two edges stay open:

  • N1 (docs). content/docs/data-modeling/import-mappings.mdx says an import meets the could-not-look-up sentence "only on metadata stored before that check". The lint does not see a target object outside the validated stack on the CLI, a target field changed from stored to formula after the owning object was published, or a reference field of a type outside the picker set (N2). Expected: the sentence names those cases, or says "mostly".
  • N2 (rule reach). The importer scopes by dependsOn on every type in IMPORT_REFERENCE_TYPES (adding tree and legacy reference), while the lint judges the referenced half only on lookup, master_detail and user. A tree field with a formula filter key is still found only at import. The spec's dependsOn text declares scoping for lookup/master_detail only. Expected: either the lint covers the importer's set, or the importer stops scoping types the spec does not declare it for; say which.

Grade: area:data · documentation · reach: one docs sentence and one lint boundary · evidence: the record above
Suggested-grade: p3
Size: XS
Related: #37717, PR #37910.

Blocked-by: #38096

Activity

  1. added
    pm:queue
    on Nov 27, 2026
  2. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:data · domain:docs · Task · p2 · pm:queue · size XS; rationale: N1, the import-mappings docs page overstates what the new lookup dependsOn lint catches, is wrong shipped text (p2). N2, a tree field formula filter key still found only at import, rides along. Recorded 2026-11-27T12:14Z.

  3. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8

    Picked by card-pick.mjs --order area:data --seat repo:objectstack#8 at 2026-11-28T02:36Z: rank 14 (p2, order 1). The maintainer in this seat's session, verbatim: 「开一个 objectstack 全仓座位」 with intake area:data, then 「batch 调到 5,可以用云卡」.

    Claim: PM loop round 1
    Session: session_017xRBcSAaBEfQpU2yJexSJ8
    Account: sunhaolin
    Branch: claude/issue-37936-import-mappings-reach
    Worktree: objectstack-issue-37936
    Domain: domain:docs (label; the landing is content/docs)
    Seat: repo:objectstack#8
    File surface: content/docs/data-modeling/import-mappings.mdx (N1) and a read-only measurement for N2 (no code change); skip-changeset (docs-only) (stop on breach; explain in the report)
    Container & model: S, mode:subagent, model: opus (dispatch-gates --tier: no path-derived mandate; default tier), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: objectstack — the shipped sentence in content/docs/data-modeling/import-mappings.mdx overstates PR #37910's lint | none | operators importing data who read why a look-up failed
    Thread-read: 7218018840
    Premise: holds for N1 — the sentence is on origin/main (read at 2026-11-28T02:36Z). N2 is a product-behaviour fork (lint covers the importer's set, or the importer stops scoping types the spec does not declare dependsOn for): this dispatch MEASURES it (who writes dependsOn on tree / legacy reference, what the spec docblock declares, what the importer and lint each do) and reports; the seat routes it after.
    Serial constraints cleared: no in-flight claim names content/docs/data-modeling/import-mappings.mdx (check-handover.mjs --inflight).
    Scope this dispatch: N1 + the N2 measurement. Part of #37936 (N2 stays open).

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8
    os-dev-report

    {
      "issue": 37936,
      "status": "done",
      "branch": "claude/issue-37936-import-mappings-reach",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38125",
      "session": "session_017xRBcSAaBEfQpU2yJexSJ8",
      "premise_still_valid": true,
      "summary": "N1 done: the import-mappings paragraph now says the formula filter-key check judges lookup/master_detail/user fields against the objects it can see. It names three cases where an import still meets the could-not-be-looked-up sentence: metadata stored before the check; tree and legacy reference fields; an os validate of a stack without both objects. The card's third case (target field turned formula after the owner was published) was measured FALSE for the runtime publish gate. The gate refuses that write, because its context holds every served object (protocol-authoring-gate.ts:527-552) and its differential charges the new finding (runtime-gate.ts:968, :1344). So the page says the gate refuses it, and the case survives only on the CLI. N2 was measured only, no change; readings are in the PR's Acceptance notes and open_questions. PR is draft, Part of #37936, label skip-changeset; files_changed: content/docs/data-modeling/import-mappings.mdx (+8/-2).",
      "tests": "Docs-only; no test changed. Measurement probe: a throwaway packages/lint/src vitest file (deleted, never committed), `pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 FILE` -> Tests 4 passed (4). Output: lookup+formula target in stack = 1 finding (control); target absent from stack = []; tree = []; reference = []; master_detail = 1; runtime gate target write with owner in context = refused at objects.pr_task.fields.project.dependsOn[0].param 'computed on read'; owner write with target absent from context = []. Head 38af7f0a9.",
      "gates": "Local at head 38af7f0a9: `dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 45; all 45 run, each exit captured before any pipe. 41 exit 0 on the first pass. 4 exited 3 PREREQUISITE NOT MET (check:doc-formula-expressions, check:doc-security-posture, check:skill-examples, check:docs-transcript-drift: no built lint/client dist); I rebuilt via the lock (`turbo run build --filter=@objectstack/lint --filter=@objectstack/client --filter=@objectstack/client-react`, VERDICT command-exit 0, 47/47 tasks) and re-ran them: all 4 exit 0. `--ran` reconciliation: 45 derived, 45 run, 0 NOT-MEASURED, 0 UNRUN. check:nul-bytes exit 0; control-byte self-scan of the mdx: no hits. overlap-check before push: VERDICT clean exit 0. CI check-runs on the PR at report time: Governed Surface Queue Guard success, Check Changeset success, Check Documentation Links success, Dogfood Regression Gate success, Test UI success, Spec property liveness success, PR-body guards success; Lint · * (8 lanes), Build Docs, Plan Test Core shards in_progress. TypeScript Type Check and Test Core not yet listed: NOT MEASURED, reason: CI had not reported yet.",
      "dogfood_battery": "n/a — no `!` in the PR title and Clause-②: no, no (narrowing) arm",
      "mcp_calls": "0",
      "api_writes": "3 — git push (branch probe and the commit, not REST); relay pr_create (POST /repos/objectstack-ai/objectstack/pulls draft + POST issues/38125/assignees + POST issues/38125/labels, one repository_dispatch); post-stamped comment on issues/37936 (POST issues/37936/comments)",
      "open_questions": [
        {
          "question": "N2: the importer scopes a column by dependsOn on lookup, master_detail, user, tree and legacy reference (IMPORT_REFERENCE_TYPES; field-value.zod.ts:154-155, import-coercion.ts:44-47, read at import-coerce.ts:1056-1061). The lint judges the dependsOn filter key only on lookup, master_detail and user (validate-object-field-refs.ts:442, :1002). The spec describe declares candidate scoping for lookup/master_detail only (field.zod.ts:2657), and the Studio field form offers dependsOn on lookup/master_detail plus the option types (field.metadata-form.ts:327). The console renders tree with the lookup widget, which reads dependsOn (ui/packages/fields/src/field-type-alias.ts:142). A tree reference may only name its own object (object.zod.ts:2018). Producers: 3 tree source sites plus 1 skill sample, 0 type 'reference' sites, 0 with dependsOn, over examples/, packages/platform-objects/, skills/. Control: dependsOn is found in 3 example object files on lookup/option fields. hotcrm and cloud were not measured. Which way?",
          "options": [
            "A — the lint covers the importer's set: judge the dependsOn reference half on tree and reference too. Cost: @objectstack/lint narrowing (Clause-② yes (narrowing), minor), 0 known producers broken, matches the console picker on tree; spec describe then names tree (prose following the ruling). Size XS.",
            "B — the importer stops scoping types the spec does not declare: scope only lookup/master_detail (decide user). Cost: @objectstack/core import behaviour change; a tree cell scoped today resolves across the whole object, and the import then disagrees with the console picker, which still filters tree by dependsOn; also needs a spec decision on user. Size S."
          ],
          "recommendation": "A, because it closes the lint gap without opening a new import-vs-picker gap, breaks no measured producer, and the tree target is always self, so the lint always sees it."
        }
      ],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: #37936 (N2) · noted, not filed — the lint module note at validate-object-field-refs.ts:436-441 says the reference-addressed keys have no reader on any type outside lookup/master_detail/user, but the console maps tree to the lookup widget (ui/packages/fields/src/field-type-alias.ts:142); it belongs to the N2 fork above"
      ],
      "deviations": "(1) I built the lint dependency closure plus lint/client/client-react on a docs-only diff, for two reasons: to run the N1 measurement probe, and because 4 derived doc gates read built dist. (2) The PR body has no attribution footer. I left it off expecting the platform to append it on create, but the relay read-back says the stored body equals the sent bytes (8058 = 8058), so no footer was appended. The seat may add it."
    }
  6. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8

    N2 route · 2026-11-28T03:08Z — seat routing on the dev's measurement (report on this card; PR #38125 Acceptance notes), inside the seat's discretion with the maintainer's veto window open:

    Route A — the lint judges the dependsOn reference half on the importer's whole set (tree and legacy reference too); the spec dependsOn describe then names tree as prose following the implementation.

    Governing text: SKILL.md 〈升级与决策〉 基本裁决原则, verbatim: 「未声明键随实现,文档随之」. Readings: the spec describe declares candidate scoping for lookup/master_detail only (field.zod.ts:2657); the importer scopes tree and reference too (IMPORT_REFERENCE_TYPES, field-value.zod.ts:154-155, read at import-coerce.ts:1056-1061); the console renders tree with the lookup widget, which reads dependsOn (ui/packages/fields/src/field-type-alias.ts:142). The behaviour is implemented on two sides and undeclared, so the declaration follows it and the lint covers it; route B would remove implemented behaviour and open an import-vs-picker gap. Measured producers broken by A: 0 (3 tree sources + 1 skill sample, none with dependsOn; hotcrm and cloud not measured).

    Order: A edits packages/lint/src/validate-object-field-refs.ts, the file PR #38096 (#34562) is changing, so it is dispatched after #38096 lands; it is a narrowing (Clause-②: no (narrowing), ADR-0087 ledger entry, one contract-review-tier L2). This card stays open (Part of #37936 on PR #38125).

  7. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#8 · sunhaolin · session_017xRBcSAaBEfQpU2yJexSJ8

    Release: claim 7232475894 (session_017xRBcSAaBEfQpU2yJexSJ8, repo:objectstack#8) · 2026-11-28T03:51Z · partial landing: N1 landed by PR #38125 (Part of #37936, merged).

    Remaining: N2, route A as recorded on this card (the lint judges the dependsOn reference half on tree and legacy reference too; the spec describe names tree). It edits packages/lint/src/validate-object-field-refs.ts, which PR #38096 (#34562) is changing ⇒ pm:blocked with Blocked-by: #38096 (added to the body). The same N2 PR removes the import-mappings.mdx case "on a tree field or a legacy reference field … the check does not judge", which route A makes false. Owed by N2: Clause-②: no (narrowing), Metadata-protocol: narrowed, an ADR-0087 semantic ledger entry, one contract-review-tier L2.

    Resume-from: claude/issue-37936-import-mappings-reach@38af7f0a (merged; a fresh branch from main is equally fine).

  8. added
    pm:blocked
    and removed
    pm:dispatched
    on Nov 28, 2026
  9. objectstack-fleet commented on Nov 29, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · sunhaolin · session_017xRBcSxvUE3fDrox79CL9t

    Unlock · pm:blocked → pm:queue · every line-leading Blocked-by: / Restart-when: on this card (body and thread) was read at 2026-11-29T00:18Z, and each target is done: PR #38096 merged. Grade unchanged. Before dispatch, re-check the card's file surface on the merged ref.

    Recorded 2026-11-29T00:18Z.

  10. added
    pm:queue
    and removed
    pm:blocked
    on Nov 29, 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

    area:datadomain:docspm:queuepriority:p2

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions