Skip to content

review follow-ups of PR #37706: lint a lookup dependsOn param that names a field its target cannot filter on; skip the unscoped probe when no scoped read answered #37717

Description

@objectstack-fleet

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Filing gate: ① (review follow-ups, one card per PR) · Source: fleet (Contract review records 7204641031 and 7205472092 on PR #37706, nits N2 and N4, adopted at ACCEPT; PR-1 #37567's nit 2)

What happens

PR #37706 (Fixes #36794, PR-2) makes an import of a lookup value outside the row's scope answer in the reader's language, and answers a scope that cannot be queried with its own sentence at run time. Two items stay open:

  • Nothing tells the author before import that a scope cannot work (N2; the lint half of PR-1 feat(spec,core): a scoped import lookup miss whose value exists under another parent answers reference_out_of_scope #37567's nit 2). A lookup whose dependsOn entry points its param at a field the target cannot be filtered on (a formula or other non-stored field) publishes clean, and every import then fails that column with "no matching record". Expected: a producer-side lint on the lookup's dependsOn.param naming the target field and why. This refuses metadata that publishes today, so it is a narrowing: grade it and declare it as one.
  • The unscoped probe can still run when no scoped read answered (N4). When every scoped read was refused for the scope cell's value (INVALID_FILTER), referenceNotFound still probes unscoped and can answer reference_out_of_scope. Same as main. Expected: skip the probe whenever no scoped read answered, and align the validation-message.ts jsdoc, changeset wording and docs line ("any other refusal keeps the plain sentence").

Category ①: an import refusal that names the wrong cause, and an authoring mistake found only at import.
Priority: p2.
Business reason: an admin importing records sees every row of a column refused without being told the lookup's setup is the cause, and an app author is not warned when they set it up.
Reader: the data-lane dev who next edits the import runner or the lookup lint rules.
Dedupe: searched open issues for "PR #37706": 0 hits.
Related: #36794, PR #37567, PR #37706.

Grade

area:data · Bug · minor · reach: read (the head against main) · evidence: read → p2

Activity

  1. added
    bug
    priority:p2
    domain:server
    on Nov 26, 2026
  2. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH

    Triage: lands in area:data · domain:server · Bug · priority:p2 · pm:queue · size S; rationale: review follow-ups of PR #37706. Lint should catch a lookup dependsOn param that names a field its target cannot filter on (a formula or non-stored field), which today publishes and then cannot work. A missed author check: p2 as filed.

  3. added
    pm:queue
    on Nov 27, 2026
  4. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Claim: PM loop round 1 · 2026-11-27T10:14Z
    Session: session_01L6bhgV6i8jfWwSXjpWJrjA
    Thread session: session_01L6bhgXj9vLmZ3KE2rWhtBH
    Account: os-sales
    Branch: claude/project-thread-wv76zu
    Domain: domain:server
    Seat: repo:objectstack#2
    Area: s2-data
    File surface: packages/lint/src/ (the lookup dependsOn.param rule beside validate-object-field-refs.ts / reference-integrity-suite.ts, its rule-explanations.ts entry and tests), packages/core/src/utils/import-coerce.ts (referenceNotFound's unscoped probe) and its validation-message.ts jsdoc, the docs line and a changeset.
    Container & model: S, mode:thread, model: opus, effort: high (reason: a narrowing lint plus a runtime refusal change)
    Clause-②: yes (narrowing) — a lookup whose dependsOn.param names a target field that cannot be filtered on publishes today and will be refused
    Metadata-protocol: none
    Responsibility: n/a — review follow-ups of merged PR #37706
    Thread-read: none
    Premise: holds — PR #37706 merged; the thread re-reads both surfaces on main before writing
    Serial constraints cleared: none

    Tier H by the narrowing: dogfood on the final head and an os-dev-report on this card before the hand-off. The PR says Fixes #37717.

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

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Claim amendment · 2026-11-27T10:23Z · amends claim 7215661638

    Metadata-protocol: narrowed — the new lint refuses a dependsOn.param value that publishes today (AGENTS.md: a value refused is narrowed); @objectstack/lint takes minor.
    Clause-②: yes (narrowing) — unchanged: the diff also adds an exported member (RefMatch.scopeUnanswered) beside the narrowing.

    ADR-0087 disposition as the precedents of #35143 and #36595: a registered spec semantic migration entry (lookup-depends-on-param-computed-field-refused). Every other line of the claim stands.

  7. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgXj9vLmZ3KE2rWhtBH
    os-dev-report

    {
      "issue": 37717,
      "status": "done",
      "branch": "claude/project-thread-wv76zu",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/37910",
      "session": "session_01L6bhgXj9vLmZ3KE2rWhtBH",
      "premise_still_valid": true,
      "summary": "N2: object-field-ref-unknown now refuses, at error, a lookup / master_detail / user dependsOn entry whose filter key (param, else the bare name or field) names a field of the referenced object computed on read (isVirtualSearchField, today formula), on os validate / lint / compile / build and the runtime publish gate; a formula on the owning side stays legal. N4: the import resolver marks a scoped lookup none of whose reads answered (and not a scope-field refusal) as RefMatch.scopeUnanswered, and referenceNotFound returns the plain reference_not_found refusal for it before the unscoped probe, so it can no longer answer reference_out_of_scope. Wording aligned in the validation-message jsdoc and import-mappings.mdx; ADR-0087 semantic entry lookup-depends-on-param-computed-field-refused; changeset lint minor, core and spec patch, Clause-② yes (narrowing), Metadata-protocol narrowed.",
      "tests": "lint validate-object-field-refs.test.ts: 4 new tests in the dependsOn describe (param refusal at .param, bare-name refusal, stored param and owner-side formula pass, runtime gate refusal at objects.crm_invoice.fields.contact.dependsOn[0].param). core import-runner-reference-master-scope.test.ts: 1 new pin (all scoped reads refused INVALID_FILTER -> reference_not_found, plain sentence, no scope, every read carried the scope). Ablations via scripts/ablation-replace.mjs on tree 40007bc2, each restored with git diff HEAD empty: runner scopeUnanswered -> {} 1 failed / 19 passed; coerce early return deleted 1 failed / 19 passed; lint filtered branch disabled 3 failed / 128 passed (restored 131 passed). Whole packages: lint 242 files / 9801 passed, core 166 files / 3902 passed. objectstack validate on app-crm, app-showcase, app-starter, app-todo, app-multi-package: pass; positive control (formula account_label on showcase_contact named by showcase_invoice.contact dependsOn param) exits 1 with the new finding, restored.",
      "gates": "Local: typecheck lint, core, spec exit 0; eslint --no-inline-config on the 8 changed source files 0 problems; dispatch-gates.mjs --commands 119 commands, each exit captured before any pipe: 116 exit 0; 3 exit 3 PREREQUISITE NOT MET, not measured (check-plugin-teardown-shape --self-test: shallow clone; spec check:skill-examples: client-react not built; check:dual-build-cjs-loads); check:type-check-debt first exit 3 (queued behind the dogfood hold), re-run under os-verify-lock exit 0, 0 ledger entries above their number. CI on 40007bc2: 60 check-runs success, 10 skipped, 0 failed (incl. TypeScript Type Check, Lint & Repo Gates, Check Changeset, Governed Surface Queue Guard, Build Core, Test Core shards, Test UI shards, Type Check UI, Live E2E UI, Dogfood Regression Gate (PR speed)).",
      "dogfood_battery": "40007bc2 · os-verify-lock: VERDICT command-exit 0 · held the lock 2450s (40m50s) · waited 0s · Test Files 490 passed | 3 skipped (493) · Tests 4144 passed | 68 skipped (4212) · no failures",
      "mcp_calls": "~16 — read-only only: mcp__github__issue_read, mcp__github__pull_request_read, mcp__github__get_job_logs, mcp__github__get_file_contents, mcp__claude-code-remote__subscribe_pr_activity; no write tool",
      "api_writes": "3 — all through the fleet-write relay: pr_create (#37910, draft); issue_patch #37910 body (gates and dogfood lines, read-back identical 10883 bytes); this comment on #37717 (post-stamped.mjs). git push of the branch is not a REST write.",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "carrier: none · noted, not filed: a dependsOn filter key naming a secret / password or internal: true field is refused as a filter for non-system callers by the caller-judging guards, not judged by this lint (PR Acceptance notes)"
      ]
    }

    Generated by Claude Code

  8. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

    Landed · 2026-11-27T12:42Z

    PR #37910 merged at 2026-11-27T12:40Z (approved by the maintainer) and closed this card: a lookup dependsOn filter key naming a formula of its target is refused at author time, and an import lookup no scoped read answered is never "out of scope". pm:dispatched is cleared. Follow-up: #37936 (the docs sentence's reach, and a tree field's filter key).

  9. removed
    pm:dispatched
    on Nov 27, 2026
  10. added a commit that references this issue on Dec 1, 2026
    709a087
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:databugdomain:serverpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions