Skip to content

feat(spec,core): a scoped import lookup miss whose value exists under another parent answers reference_out_of_scope - #37567

Merged
objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-zt8cu4
Nov 26, 2026
Merged

objectstack-fleet[bot] merged 4 commits into
mainfrom
claude/project-thread-zt8cu4

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Sales · project thread

Part of #36794 (PR-1 of 2: the spec reason and the importer; the Import Wizard text follows in PR-2 on the same branch once this one lands)

Clause-②: yes (widening)
Metadata-protocol: added (ValidateDataIssueSchema.scope, a new optional key on the import cell error; the new FieldErrorCode value is a wire code, no author-writable key)
Skills-docs: follow-up #37590

维护者速读

  • 导入时,查找列填了一个只在别的父记录下存在的记录(例如合同属于另一个客户),服务端现在单独报“不在本行的范围内”,并把限定它的列和单元格作为数据返回;真正不存在的值照旧报“找不到记录”。
  • 这是导入查找报错专题的后半段:上一张已让报错文字带上限定列,这张让依赖错误码的界面(导入向导)也能分清两种情况。
  • 只影响导入失败行的错误码和多出的一个可选字段,成功导入不受影响;按旧错误码筛“找不到”的客户端,在这种情况下会收到新码,可整张撤回。
  • 无。

What changes

  • FieldErrorCode gains reference_out_of_scope (packages/spec/src/api/errors.zod.ts, ADR-0114 D2 closed catalog), beside reference_not_found. Ruled route A on the card.
  • Catalog sentence import_reference_out_of_scope in all four platform locales (packages/spec/src/system/validation-message.ts). The English text is byte-identical to the sentence the scoped refusal already shipped with (Contract: no record matches "CTR-0006" (Account = "Acme")), now with {{scope}} as a parameter, so a deployment can override it under validation.field.import_reference_out_of_scope and the other three locales say it in their own word order.
  • ValidateDataIssueSchema gains an optional scope: [{ field, value }] (packages/spec/src/api/protocol.zod.ts), present only on an import cell error whose code is reference_out_of_scope. This is the thread's route decision, agreed by the seat at claim time: the card asks the Wizard to name the scoping column and its cell while keying on the code and never parsing server prose, and the row result carried no structured column at all. Same { field, value } naming the importer already uses for the columns; additive, optional, Clause-② widening. The contract review below judges it.
  • Core importer (packages/core/src/utils/import-coerce.ts, import-runner.ts): the fix(core): a scoped import lookup miss names the scoping column when the value exists outside the scope #36735 unscoped probe now answers the new reason with the new message key and the scope entries; the runner copies scope onto the row's errors element. A value nobody has keeps reference_not_found.
  • A scoped read the field-predicate guard refused is never probed (RefMatch.scopeDenied, isScopeFieldDenial). A caller who cannot read the scope field (a hidden master_detail field, or the param a dependsOn entry names) has the scoped lookup refused, so its miss says nothing about where the value lives. Before this PR the probe still ran and the fix(core): a scoped import lookup miss names the scoping column when the value exists outside the scope #36735 sentence named the scope; with a code that now claims "under another parent", that answer would be wrong for a record sitting under the row's own parent. It keeps reference_not_found and the plain sentence, which is what content/docs/data-modeling/import-mappings.mdx already says for that caller. The guard is read off the error's declared details.reason === 'field_predicate_denied' (the reason all four field-predicate guards answer) naming a scope field, never its message.
  • packages/runtime/src/dispatcher-error-vocabulary.ts: the new code's foreign-vocabulary row (ADR-0112 D6), same wording as its three siblings.
  • Docs: content/docs/api/error-catalog.mdx field-code table and content/docs/data-modeling/import-mappings.mdx scoped-lookup section. Regenerated: content/docs/references/api/{errors,export,protocol}.mdx, packages/spec/authorable-surface/api.json (api/ValidateDataIssue:scope), the strictness-ledger count for api/ (537 → 538, the new nested object).
  • Changeset: @objectstack/spec minor, @objectstack/core and @objectstack/runtime patch. Metadata-protocol: added, not the claim's none: Check Changeset reads the new api/ValidateDataIssue:scope row in packages/spec/authorable-surface/api.json as a key entered, and a kind other than none grades the package that carries it at least minor.

Tests

Local readings (tree f4a201e + 2e8b0b9)

Acceptance notes

  • Narrowing question left to the contract review, as the card asks: a client matching reason === 'reference_not_found' to mean "the lookup cell did not resolve" stops seeing the out-of-scope case under that value. The schema only widens (a new enum member, a new optional key), so this PR declares Clause-②: yes (widening); whether the move of that case is itself a narrowing for such a client is the L2's call.
  • Skill text made false, not fixed here (Skills-docs: follow-up owed): skills/objectstack-data/rules/relationships.md:117 says another master's detail answers reference_not_found. skills/** is governed, and this PR's Clause-②: yes keeps it off the low-risk arm, so the line here would make the whole PR Tier H; its follow-up card is skills: objectstack-data relationships rule says another master's detail is reference_not_found on import; after PR #37567 it is reference_out_of_scope #37590.
  • Between this PR and PR-2 the Import Wizard meets a code it has no case for, so formatDryRunError falls through to the server's own sentence (already in the caller's locale, naming the scope) on both the dry-run panel and the completion screen. PR-2 gives the code its own Wizard key built from scope.

Verification

Read first: packages/core/src/utils/import-coerce.ts referenceNotFound (the new reason and the guard), packages/core/src/utils/import-runner.ts the resolver's catch (isScopeFieldDenial), packages/spec/src/api/protocol.zod.ts ValidateDataIssueSchema.scope.

Two-minute check: pnpm --filter @objectstack/rest exec vitest run src/import-integration.test.ts -t "under another parent" — one test, green; row 2 answers reference_out_of_scope with its scope.


Generated by Claude Code

… another parent answers reference_out_of_scope

FieldErrorCode gains reference_out_of_scope, with its catalog sentence
import_reference_out_of_scope in all four platform locales. The importer
answers it for a scoped lookup cell whose value matches a record only
outside the row's scope, and the cell error carries the scoping columns as
`scope: [{ field, value }]` (ValidateDataIssueSchema), so a client keyed on
the code can name the column and its cell without parsing the message.
A value no record has keeps reference_not_found. A scoped read the
field-predicate guard refused is never probed, so it stays
reference_not_found too.

Claude-Session: https://claude.ai/code/session_01L6bhgWgMUXf5juNBhN6rLX
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added size/m documentation Improvements or additions to documentation protocol:system tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/core, @objectstack/runtime, @objectstack/spec, touching 22 documentable anchor(s). ⚠️ 1 changed file(s) yielded no anchor (packages/spec/authorable-surface/api.json), so the pages documenting them are NOT COVERED by this run — this is not a clean bill of health for those files.

12 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:

  • content/docs/api/client-sdk.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/api/error-catalog.mdx (via FieldErrorCode (symbol, a top-level const object), reference_out_of_scope (literal, a string literal in FieldErrorCode; a string literal in UNREGISTERED_CODE_SITES; a string literal in referenceNotFound))
  • content/docs/api/error-handling-client.mdx (via FieldErrorCode (symbol, a top-level const object))
  • content/docs/api/error-handling-server.mdx (via FieldErrorCode (symbol, a top-level const object))
  • content/docs/api/wire-format.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/data-modeling/currency.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it), /:object/import/jobs (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/data-modeling/fields.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/data-modeling/import-mappings.mdx (via reference_out_of_scope (literal, a string literal in FieldErrorCode; a string literal in UNREGISTERED_CODE_SITES; a string literal in referenceNotFound), /:object/import (route, bridged from symbol runImport — its route source's handler names it), /:object/import/jobs (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/permissions/authorization.mdx (via field_predicate_denied (literal, a string literal in a comment on a changed line; a string literal in isScopeFieldDenial))
  • content/docs/permissions/system-context.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it), /:object/import/jobs (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/protocol/kernel/error-handling.mdx (via FieldErrorCode (symbol, a top-level const object))
  • content/docs/protocol/objectql/state-machine.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it), /:object/import/jobs (route, bridged from symbol runImport — its route source's handler names it))

⛔ 5 release-owned page(s) also name something this change touched. These are read-only:

  • content/docs/releases/v12.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/releases/v17/17-0.mdx (via FieldErrorCode (symbol, a top-level const object))
  • content/docs/releases/v17/17-6.mdx (via runImport (symbol, a top-level function), /:object/import (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/releases/v18/18-1.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it))
  • content/docs/releases/v18/18-2.mdx (via /:object/import (route, bridged from symbol runImport — its route source's handler names it))

content/docs/releases/ is RELEASE-OWNED (AGENTS.md "Documentation Guardrails"): release
notes are written centrally at release time, and a code PR that edits them is the exact PR
that guardrail exists to stop. They are still audited — read-only. If one of them is actually
wrong, file an issue or open a dedicated docs-only PR; do not edit it here.

What this run could not see
  • 1 changed file(s) yielded no anchor (packages/spec/authorable-surface/api.json) — pages documenting those are invisible to this run
  • 4 name(s) were too generic to anchor anything (single lowercase words)
  • the SDK route bridge reached 69 of 252 client-bound route-ledger rows — the other 183 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 183: 0 are remediable by widening that discovery convention (an in-repo file declares the path; the convention did not scan it); 59 are structural — on a ledger where NOT ONE row is declared in-repo, so no discovery change reaches them at any price; 124 are undecided (no in-repo declaration, on a ledger that has other in-repo registrars — absence and an unreadable spelling are not distinguishable here). The rows themselves: node scripts/docs-audit/affected-docs.mjs --bridge-coverage
  • a page that states a rule by its inputs shares no identifier with the emitter that implements the rule, so an emitter-only diff cannot list it — not on this run and not on any run. Measured on fix(driver-sql): emit varchar(maxLength) for a text field a declared index keys on #11430: content/docs/protocol/objectql/types.mdx documents the text-family column mapping by the ObjectQL type names it maps FROM (text / textarea / html) while the diff changed createColumn; it went unlisted, and it was the page that diff falsified, in four places. No shared token exists to detect this on, so a rule your change carries has to be re-read by hand in the pages that restate it.
  • a key NAME is not a key, so the hand re-read the line above prescribes can land on the wrong schema. The same spelling is authorable on one governed type and a [REMOVED] tombstone on another for each of active, aria, joins, objects, template, tools and version (censused on [finding] tools is a key on BOTH AgentSchema (tombstoned, dead) and SkillSchema (live, cloud-attested), so a name-based search attributes skill examples to the agent key — it produced a false stop-the-line alarm on PR #19059 #19093 over the liveness ledger's governed types, top-level keys); nothing in a search result distinguishes the two, so a grep hit on a LIVE example reads as evidence about the DEAD key. Measured on fix(spec): the agent.tools liveness row says dead — it claimed live on a key the schema tombstoned #19059: content/docs/ai/agents.mdx was reported as contradicting the agent.tools tombstone over its tools: example at :161, which is inside the defineSkill({ block opened at :155 — the page was already correct. Settle ownership by PARSING the value against both schemas, never by the name: that literal PASSES SkillSchema, and as an AgentSchema it FAILS at tools with the tombstone prescription. ⛔ These names are not the whole class — a key retired through a .strict() guidance map leaves no tombstone in the walked shape and none of them here (tool.category, live as AIToolDefinition.category).

Coarse fallback — 187 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): node scripts/docs-audit/affected-docs.mjs --json 6c290d3af7c52d019d1de1c09b6b0306f09700bb → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 1aab83e008917f501af2fcee095f67a62ce4f6b3 — the merge of head 80a79c7732c04fc57b067c26aa74bdabe5b34604 into base 6c290d3af7c52d019d1de1c09b6b0306f09700bb, which is what actions/checkout gives a pull_request run. Not the PR head.

A worktree cut from an older main holds a different content/docs, so re-deriving there can legitimately return a different list — that is a different tree, not a wrong row. To answer on the same tree:

# while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 1aab83e008917f501af2fcee095f67a62ce4f6b3 && git checkout 1aab83e008917f501af2fcee095f67a62ce4f6b3
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 6c290d3af7c52d019d1de1c09b6b0306f09700bb 80a79c7732c04fc57b067c26aa74bdabe5b34604 && git checkout -B drift-repro 6c290d3af7c52d019d1de1c09b6b0306f09700bb && git merge --no-ff 80a79c7732c04fc57b067c26aa74bdabe5b34604

node scripts/docs-audit/affected-docs.mjs --json 6c290d3af7c52d019d1de1c09b6b0306f09700bb

⚠️ That checkout carried uncommitted changes, so the commit above does not fully identify what was read.

Advisory only, and a precision-first one (#9192): a page is listed because it names a
symbol, wire route or SDK method this diff touched — not because it mentions a changed
package. Each row says which anchor put it there, so a wrong row is reportable rather than
merely annoying. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs 6c290d3af7c52d019d1de1c09b6b0306f09700bb → pass the list as
args.docs, on the commit named under Which tree this was computed on.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 80a79c7732c04fc57b067c26aa74bdabe5b34604
Local-runs: none
Scope: packages/spec/src/api/errors.zod.ts, packages/spec/src/api/protocol.zod.ts, packages/spec/src/system/validation-message.ts + packages/core/src/utils/import-coerce.ts, packages/core/src/utils/import-runner.ts, packages/runtime/src/dispatcher-error-vocabulary.ts

① Derived judgments

Read: card #36794 (body, triage 7118224568, claim 7192981274, amendment 7194794693), the PR body and its 17-file list, the net diff against main (merge-base 061e3422), and the check-runs on the head. Newest run per check name is success or skipped; the cancelled PR-body guards run is superseded by a success on the same head. The PR author is objectstack-fleet[bot]. The PR is still a draft.

  • FieldErrorCode gains one member, reference_out_of_scope. The accept-set of FieldErrorSchema.code (closed, ADR-0114 D2) widens by one and nothing leaves it. Right, and declared.
  • ValidateDataIssueSchema gains an optional scope, an array of { field, value }, both strings. The element is shared, so the key parses at every position that embeds it: ImportRowResult.errors and .warnings, the validate verdict's errors and warnings, and the write answers' warnings. The regenerated references show exactly those positions, api/ValidateDataIssue:scope enters authorable-surface/api.json, and the strictness-ledger count for api/ moves by one for the nested object. Right. rule and severity reached this element the same way.
  • BUILTIN_VALIDATION_MESSAGES gains import_reference_out_of_scope in en, zh-CN, ja-JP and es-ES, overridable under validation.field.import_reference_out_of_scope. Additive. Right.
  • @objectstack/core exported types gain two optional members, RefMatch.scopeDenied and FieldCoerceError.scope. Additive. Right.
  • dispatcher-error-vocabulary.ts gains one foreign-vocabulary row, worded as its three sibling rows. Right.
  • Behaviour, not shape: the importer emits the new code where it emitted reference_not_found with a qualified sentence, and a scoped read the field-predicate guard refused is no longer probed. Judged in ③ and ④.
  • No removal, no tombstone, no rename, no requirement tightened. Nothing implies an ADR-0087 registry entry.

② Semver level

  • The changeset bumps @objectstack/spec minor, @objectstack/core patch and @objectstack/runtime patch. Metadata-protocol: added grades the package that carries the key at least minor, and that package is spec. Core publishes a behaviour change and two optional type members, runtime a ledger row; neither carries a protocol key, so patch. packages/rest changes a test only and takes no bump. Check Changeset is green on the head.
  • Clause-②: yes (widening) and Metadata-protocol: added are line-initial in both the PR body and the changeset body. The line is right: the diff widens a published enum and a published element, and takes nothing away (see ③ for the narrowing question).
  • added instead of the card's expected none is the gate's own reading of the new authorable-surface row; the claim amendment 7194794693 records the change. Right as declared.
  • The changeset body names the case that moved, what stays, and what a client does about it.

③ Boundary flags

The card's question: is moving the cross-parent case out of reference_not_found a narrowing for a client that matches by code? No, not in the declaration's sense. Clause-②: yes (widening) alone is the right line. No (narrowing) arm and no ADR-0087 disposition is owed.

  • The arm reads the published accept-set and public surface. After this diff every value that parsed before still parses: reference_not_found stays a member, and the issue element only gains an optional key. Nothing is removed, tombstoned or refused, and no requirement tightens.
  • What moves is which member the importer EMITS for one case. On an answer position that is one event seen from two sides. The set of codes a client must know grows by one, which is the widening already declared. The client that matched the old code for that case stops matching it. The second effect is real, but it takes no declared capability away: the spec on main declares reference_not_found as "a lookup target that does not exist", and in the moved case the target exists. Only prose said the cross-master case answers the old code (import-mappings.mdx on main, and the skill line skills: objectstack-data relationships rule says another master's detail is reference_not_found on import; after PR #37567 it is reference_out_of_scope #37590 tracks), and prose follows the implementation.
  • The arm pair is closed and a line takes at most one arm. (narrowing) marks a changeset BREAKING and puts the PR on the declared-narrowing leg; here it would describe a diff that refuses no input it accepted before.
  • ADR-0087's ledger registers retirements and conversions of what an author can write or a consumer can import. A wire answer is not stored metadata, so there is no FROM and TO a conversion could replay. Its registration gate is driven by a breaking declaration, and none is owed.
  • What the move does owe is a plain statement where a consumer reads it. The changeset carries it: the case that moved, the case that stays, and "match both" for a client that wants every unresolved lookup cell. In this repository the one reader keyed on this code for import rows is the Import Wizard, and its fall-through shows the server's sentence until PR-2.
  • Treating a re-partition of an answer code as breaking, as a class, would be a rule change for the maintainer. This record does not make it.

Other flags.

  • The scope key, decided by the thread inside ruling A's surface: judged in ④ under protocol.zod.ts. It holds.
  • Skills-docs: follow-up #37590: the card is open and names the line this PR makes false. skills/** is governed, so the fix belongs there. Right arm.
  • Between PR-1 and PR-2: read formatDryRunError on the head. A code it has no case for falls through to the server's sentence. No regression; the interim text says more than the "no matching record" it replaces.
  • Part of #36794 is right: the Wizard half is PR-2.
  • SQL push-down: no finding. The diff adds no read. The unscoped probe is fix(core): a scoped import lookup miss names the scoping column when the value exists outside the scope #36735's: one resolver call per FAILING scoped cell, each candidate one findData with an equality where and limit: 2, pushed to the driver. No id list is materialised and nothing is joined in the application. On the refused path the diff removes reads: the loop stops at the first candidate and the probe is skipped. A miss is still not cached, as the resolver's own comment says on purpose, so a file whose every row names a missing value under a scope pays the probe per row; that is not new here.
  • The in-scope extra fix (a caller who cannot read the scoping field keeps reference_not_found, and no unscoped probe runs): judged in ④ under import-runner.ts. It holds on every door I could reach by reading.

④ Design judgment

packages/spec/src/api/errors.zod.ts — holds. The member sits beside its two siblings, as ruling A item 1 asks. Its comment states the implemented condition: a scoped miss plus an unscoped match answers the new code, and a value matching nothing anywhere keeps the old one. Its first consumer is coerceError in import-coerce.ts, whose code parameter is typed by this enum. Tried to break it: an unscoped match is necessarily outside the scope, because the scoped read over the same candidates has just missed. A record whose scoping field is empty is outside the scope too; the comment's first clause covers it and its gloss "under another parent" overstates it slightly. Accepted.

packages/spec/src/api/protocol.zod.ts — holds, the route decision included. Ruling A item 2 requires the Wizard to name the scoping column and its cell while it keys on the code and parses no server prose. On main the element carries no column at all. The other route, a client deriving the scope from field metadata, would re-implement the inferred-master rule that only the server owns (referenceScopeSources), and the docs say the record picker has no counterpart for it. So the key is pulled by the ruling's own acceptance, sits inside ruling A's surface, and is the smaller route. The shape is right: field is the row column's API name, which a client maps to its own label, and value is the cell as typed. The target-side param and the coerced id stay unpublished, and the entries carry only what the caller wrote. Emission agrees with the describe sentence by sentence: only on that code (coerce sets it on the out-of-scope branch alone, the runner copies it only when set, and its absence on reference_not_found is pinned), and in the sentence's order (one scopedBy array feeds both). First consumer is PR-2's formatDryRunError. It reads the row's first-error keys today, and scope rides on errors[] only, so PR-2 reads element 0, which names the same cell by ImportRowResultSchema's own rule.

packages/spec/src/system/validation-message.ts — holds. The key exists in all four locales with both placeholders, and the English render is byte-identical to the sentence #36735 shipped; both are pinned. The jsdoc agrees with referenceNotFound: the qualifier is composed from labels, cells and punctuation only.

packages/core/src/utils/import-coerce.ts — agrees with the contract. referenceNotFound returns the plain refusal when there is no scope, returns it again before the probe when the scoped match says scopeDenied, and otherwise asks once more without the scope through the same resolver. A match or a tie answers the new code, the new sentence key and the scope entries. The single-value and multi-value branches both hand in the scoped match.

packages/core/src/utils/import-runner.ts — agrees with the contract. isScopeFieldDenial reads the refusal's declared details, never its message. Read against the three throw sites on the head that answer that reason (plugin-security predicate-guard.ts, plugin-audit parent-field-query-guard.ts, plugin-approvals payload-predicate-guard.ts): each sets details to the object, the bare names of every offending field, and the reason, and the security middleware rethrows the same instance. The candidate list starts at id, so the first scoped read reaches the guard and the loop stops there. The refusal is not cached. One site copies scope onto the row, and it runs before the dry-run split, so a dry run and a commit answer alike.
Doors: runImport has five callers on the head (the REST import route, the REST import-job route, the user-import door, connector pull and datasource pull). All take the resolver built inside runImport, none builds a second one, and the REST routes return summary.results verbatim. So the fix holds on the dry run and on the commit, over REST and in-process. Which context each caller hands the runner is not in this diff.

packages/runtime/src/dispatcher-error-vocabulary.ts — agrees. The row is the sibling rows' wording with the new code, and the vocabulary gate is green on the head.

No must-fix, no should-fix.

Nits, each an accepted deviation or a follow-up; none moves the verdict:

  • Sibling text still describes a cell error as the triple field, code, message: the ImportRowResultSchema.errors describe and jsdoc in packages/spec/src/api/export.zod.ts (not in this diff), and the errors jsdoc near import-runner.ts:90. Neither says "only", so neither is false; both are now incomplete. Fixing either moves the head, so it waits for a change that touches those files.
  • The "scope was never asked" rule is a positive match on one refusal reason. Any other throw on every scoped candidate is still read as a miss and probed. The one reachable instance I found needs a declaration the platform cannot execute: a dependsOn param naming a field the engine refuses to filter by (a formula). Lint's dependsOn rule judges that the name exists on the referenced object, not that it can be filtered by, and the record picker's filter on the same declaration is refused as well. Each scoped row then answers the new code although the scope was never evaluated. The qualified sentence has said the same since fix(core): a scoped import lookup miss names the scoping column when the value exists outside the scope #36735, so the misattribution is not new, but a code now asserts it. The fix belongs at the producer (lint refuses such a param), and the resolver could report "could not ask" for any scoped read where no candidate query completed. Follow-up card.
  • The guard pin builds the refusal by hand, and no pin drives a real guard through a real engine on the import path. The reason is matched as a string literal across packages, so a rename at the guard would leave the pin green. Follow-up: one real-engine pin.
  • For the lane seat, prose not reviewed under ④: content/docs/api/error-catalog.mdx says the cell error "names that parent's columns in scope" directly after "another parent". scope names the row's own columns. A prose-face fix.

Implemented-by: claude/project-thread-zt8cu4
Reviewed-by: session_01L6bhgV6i8jfWwSXjpWJrjA

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

席位核对 — ACCEPT · head 80a79c7 · card #36794 (PR-1 of 2) · area s2-data · 2026-11-26T15:11Z

L1 checklist

  • Shape and relation: l1-face.mjs --pr 37567 flagged two items, both answered here.
    • changeset for @objectstack/rest: its one file is src/import-integration.test.ts, and the package publishes dist, README.md and CHANGELOG.md only, so no rest entry is owed.
    • all-checks: the one non-success is a cancelled PR-body guards run at 14:26:54Z, superseded by the same-name run that succeeded at 14:27:11Z.
    • At 80a79c7 every newest run per name is success or an expected skip, with 0 pending. 343 changed lines, not governed.
  • Part of #36794 is right. This is PR-1, the spec reason reference_out_of_scope with its optional scope key and the importer that emits it. PR-2, the Import Wizard text, follows on the same branch after this lands. The card keeps pm:dispatched (landing rule B).
  • Declarations: Clause-②: yes (widening) and Metadata-protocol: added match the diff (a new enum member and an optional key on the issue element; the authorable-surface row). Skills-docs: follow-up #37590 is true: the skill line on import error codes is that card's.
  • L2: the Contract review record 7195843916 at CONTRACT_REVIEW_TIER on this head is a PASS with no must-fix and no should-fix. It also answers that this is not a narrowing, so no (narrowing) arm and no ADR-0087 disposition are owed.
  • L2 nits, recorded as follow-ups rather than fixed here (a fix would move the head):
    • N1, the stale field/code/message description of a cell error in export.zod.ts and import-runner.ts, and N4, the error-catalog.mdx sentence on scope: both ride PR-2, which touches the same import surface.
    • N2, a dependsOn param naming a field the engine will not filter by, and N3, one real-engine pin for the field-guard path: both go on the card as PR-2 scope or a follow-up card at PR-2's ACCEPT.
  • Sentence-by-sentence read of the changeset (@objectstack/spec minor, @objectstack/core and @objectstack/runtime patch): it matches the diff, including the consumer note to match both codes until clients move.

Tier: S. Landing: ready + auto-merge by this stroke.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 26, 2026 15:12
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⛔ merge queue 构建失败 — 先分诊,再决定要不要重排

队列构建 45846812886 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集),
所以失败的测试可能在本 PR 没碰过的包里 —— 那不是重排能修的。每次盲目重排都会让排在后面的所有 PR 重建一轮。

分类:failure —— 按下面的日志分诊。

失败的 job(日志抽取,best effort):

  • Test Core (5/10) — 失败步骤: Run this shard's tests

    @objectstack/cli:test:  FAIL   integration  test/start-deployment-durability.integration.test.ts > #30120 — with the image switch on, a start missing its settings refuses > none set: exit 1, naming al
      ↳ 失败原因: @objectstack/cli:test: Error: Test timed out in 5000ms.
    

↳ 失败原因 是判读的关键:超时(Test timed out in … / Hook timed out in …)多半是负载/时序,不是本 PR 的回归;
断言(AssertionError: …)才指向真实的行为改变。两者的 FAIL 行长得一模一样,只有这一行能区分。

⚠️ 断言这一侧有一类例外,判据是断言在测什么,不是它是不是 AssertionError。 断言的对象是产品行为(一个值、一个形状、一次拒收)⇒ 照上面读:真实的行为改变,去查,⛔ 不要重排掉;
断言的对象是这次实验自身的有效性前提(跑完的耗时、负载下的先后、任何只在时间预算内才成立的条件)⇒ 它跟超时是同一类,同样对负载敏感,重排一次是合法的判别手段。
识别是机械的:断言的消息或它比较的值本身点名了一段时长、一个时间戳、一个耗时计数。实测过的一对 —— AssertionError: SecurityPlugin.init() ran: expected false to be true 测的是产品行为(真回归);
AssertionError: this run took over a second, so second-precision stamps could have differed too: expected 1006 to be less than 1000 测的是实验前提:它守护的那条不变式当时是绿的,同一个 head 原样重排一次即成功。
穿着 AssertionError 外衣的时间测量,仍然是时间测量。(⛔ 这只改「怎么读一次红」,不改「哪些测试可以重排」——后者由别处管。)

跨 PR 相同签名(24h,按失败测试文件聚合):

历史信号:

  • 本 PR 过去 24h 无队列失败记录(首次)。
  • 过去 24h 队列共有 9 个失败构建(不含本次)。

分诊清单:

  1. 失败测试在本 PR 改动的包里 → 真回归,修 PR。
  2. 失败测试与本 PR 无关 → 看上面的「跨 PR 相同签名」;已有汇总 issue ⇒ flaky/环境问题实锤,去那张 issue 上谈,修好前重排只会再烧一轮全队列。
  3. 两者都不是 → 可能与同组 PR 语义冲突;等前面的 PR 落地或失败出队后再重排一次即可,不要连续重排。

Generated by Claude Code · merge-queue-triage workflow (#4859)

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA

重投 · head 80a79c7 · 2026-11-26T15:45Z

The merge queue dropped this PR (CI_FAILURE) on merge-group run 45846812886. The only red job is Test Core (5/10): packages/cli/test/start-deployment-durability.integration.test.ts › #30120 — with the image switch on, a start missing its settings refuses › none set: exit 1, naming all three, before anything is written, Test timed out in 5000ms (1 of 221 cli test files).

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

Labels

documentation Improvements or additions to documentation protocol:system size/m tests tooling Fix lands in tooling, not a product package — enters pm:queue only with Unblocks: or a named surface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants