Skip to content

fix(lint): the inline-edit advisories read every inline-edit mode, not only inlineEdit: true - #34712

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34636-inline-edit-advisories
Nov 17, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-34636-inline-edit-advisories

Conversation

@objectstack-fleet

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

Copy link
Copy Markdown
Contributor

Fixes #34636
Clause-②: no
Metadata-protocol: none

维护者速读

  • 改了什么:os lint 的两条主从明细建议(relationship/line-items-inline-edit、relationship/association-inline-edit)现在把 inlineEdit 的三种取值 true / 'grid' / 'form' 都当作“已行内编辑”。
  • 为什么改:之前两条规则只认 true。作者已选 'grid' 或 'form' 的明细行仍被建议改成 inlineEdit: true,会覆盖作者自己选的模式;评论、审计、动态这类关联对象写 'grid' / 'form' 时又收不到警告。
  • 风险与回滚:只影响 lint 建议,不拒收任何元数据,运行时零变化;规则 id、级别、提示文案都不变。回滚即 revert 本 PR。
  • 先看:packages/lint/src/data-model-rules.ts 里新增的 isInlineEdited 与 R5、R6 两处条件;再看 packages/lint/src/data-model-rules.inline-edit-advisories.test.ts。
  • 两分钟验证:pnpm --filter @objectstack/lint exec vitest run src/data-model-rules.inline-edit-advisories.test.ts,预期 10 个用例全部通过。
  • 需要你做的:无,席位落地。

What changes

FieldSchema.inlineEdit accepts true, 'grid' and 'form', and every reader treats all three as inline-edited (the console's inline subforms read any truthy value; the spec's isBodyTableRelationship and the sibling relationship/inline-edit-needs-bulk rule spell out all three). Two advisories in packages/lint/src/data-model-rules.ts read only the literal true:

  • R5 relationship/line-items-inline-edit fired on inlineEdit !== true. A *_line child whose master_detail declares 'grid' or 'form' was told to "consider inlineEdit: true", with a fix that replaces the author's chosen mode. It is now silent for all three values and fires only when inlineEdit is absent or false, which is the case its message and fix are written for.
  • R6 relationship/association-inline-edit fired on inlineEdit === true. An association child (comments, audit, activity) declaring 'grid' or 'form' clutters the parent's entry form the same way and drew no warning. It now warns for all three.

All three sites (R5, R6, and the existing inline-edit-needs-bulk loop, which restated the three values inline) now call one file-local predicate, isInlineEdited(def). It is not exported. The spec has no standalone "is inline-edited" export: isBodyTableRelationship answers a different question (it also reads relatedList, and only for master_detail), so reusing it would change R6's reach.

Rule ids, severities, messages and fix text are unchanged. The published reference skills/objectstack-data/references/lint-rules.md already describes the corrected behaviour ("without inlineEdit" / "marked inlineEdit"), so no doc edit is needed. The inline-edit-needs-bulk site is a behaviour-identical refactor.

Tests

New file packages/lint/src/data-model-rules.inline-edit-advisories.test.ts, 10 cases:

  • R5 is silent for true, 'grid', 'form'; it suggests (severity suggestion, path objects[1].fields.order.inlineEdit) for absent and false.
  • R6 warns (severity warning, same path, exactly one finding) for true, 'grid', 'form'; it is silent for absent and false.
Premise, measured on origin/main fecd2e9 before the source edit

The new test file was run against the unmodified source. Exactly the four 'grid' / 'form' cases were red, and the true, absent and false controls were green:

× is silent when the line-item relationship declares inlineEdit: grid
× is silent when the line-item relationship declares inlineEdit: form
× warns when an association relationship declares inlineEdit: grid
× warns when an association relationship declares inlineEdit: form
Tests  4 failed | 6 passed (10)
Ablation, one per rule (scripts/ablation-replace.mjs, mutation landed and restored, verified on disk)

The test imports ./data-model-rules.js from source, not through a package's exports, so no dist rebuild leg applies.

  • R5 condition reverted to def.inlineEdit !== true: anchor x1 to x0, blob 78bd12081be5 to 72e0563d1751. Red: is silent … inlineEdit: grid, … form (2 failed, 8 passed). Restored: blob equals HEAD 78bd12081be5, git diff HEAD empty.
  • R6 condition reverted to def.inlineEdit === true: anchor x1 to x0, blob 78bd12081be5 to 85ab31f4f1fc. Red: warns … inlineEdit: grid, … form (2 failed, 8 passed). Restored: blob equals HEAD 78bd12081be5, git diff HEAD empty.
Package suite and typecheck

After merging origin/main (a34eb07) and rebuilding the lint dependency closure:

  • pnpm --filter @objectstack/lint test: Test Files 215 passed (215), Tests 9117 passed (9117).
  • pnpm --filter @objectstack/lint typecheck: exit 0, check:test-typecheck: OK. The new test file is in the tsconfig.test.json program (--listFilesOnly count 1).
  • pnpm --filter @objectstack/cli exec vitest run --project unit test/data-model-rules.test.ts (it pins both rules through lint's dist): 64 passed. This run was on the pre-merge head.

Acceptance notes

  • The changeset is @objectstack/lint patch. Nothing an author can write changes (Metadata-protocol: none). An advisory now fires on two more accepted values, so Clause-②: no.

Verification

Reads below are on head 21e33be203 (merge of origin/main a34eb07), after a full pnpm turbo run build (exit 0, 120/120 tasks).

  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack: 63 commands derived from 3 changed paths.
  • All 63 ran: 63 exit 0. --ran reconciliation: 63 derived, 63 run, 0 NOT-MEASURED, 0 UNRUN (a derived zero; every line carries an exit code).
  • On the pre-merge head, the first pass had check:dual-build-cjs-loads and check:lean-entry-closure at exit 3 (PREREQUISITE NOT MET: no repo-wide dist/). After a full build both measured exit 0. On this head both measure exit 0 in the same pass as the rest.
  • No exported symbol was renamed or deleted, so check-platform-checklist --changed-from is not owed. No control characters were added.
  • test:repo, the full lint workflow and the PR check-runs are CI's; they were not re-run here.
Derived gate record (63, command :: exit code)
node scripts/check-adr-0087-registration.mjs --base origin/main :: exit 0
node scripts/check-adr-0087-registration.mjs --self-test :: exit 0
node scripts/check-changeset-no-major.mjs --base origin/main :: exit 0
node scripts/check-closing-keyword-parity.mjs :: exit 0
node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0
node scripts/check-comment-mask-adoption.mjs :: exit 0
node scripts/check-comment-mask-adoption.mjs --self-test :: exit 0
node scripts/check-comment-mask-corpus.mjs :: exit 0
node scripts/check-dts-emitted.mjs --self-test :: exit 0
node scripts/check-empty-changeset.mjs --base origin/main :: exit 0
node scripts/check-empty-changeset.mjs --self-test :: exit 0
node scripts/check-issue-citations.mjs :: exit 0
node scripts/check-plugin-teardown-shape.mjs :: exit 0
node scripts/check-plugin-teardown-shape.mjs --self-test :: exit 0
node scripts/ci/assert-turbo-remote-cache.mjs --self-test :: exit 0
node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0
node scripts/ci/prune-turbo-cache.mjs --self-test :: exit 0
node scripts/ci/snapshot-next.mjs --self-test :: exit 0
node scripts/docs-audit/check-affected-docs.mjs :: exit 0
node scripts/docs-audit/check-drift-comment.mjs :: exit 0
node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0
node scripts/pm/release-rehearsal-clone.mjs --self-test :: exit 0
node scripts/release-pending-publish.mjs --self-test :: exit 0
pnpm --filter @objectstack/spec run check:duration-unit-keys :: exit 0
pnpm check:adr-anchors :: exit 0
pnpm check:changeset-gate-self-tests :: exit 0
pnpm check:ci-filter-parity :: exit 0
pnpm check:cli-command-ids :: exit 0
pnpm check:closed-ceremony-text :: exit 0
pnpm check:cross-package-test-inputs :: exit 0
pnpm check:doc-authoring :: exit 0
pnpm check:docs-transcript-drift :: exit 0
pnpm check:driver-memory-census :: exit 0
pnpm check:dts-closure :: exit 0
pnpm check:dual-build-cjs-loads :: exit 0
pnpm check:engine-double-contract :: exit 0
pnpm check:gitlink-declared :: exit 0
pnpm check:issue-citations :: exit 0
pnpm check:keyed-text-bounds :: exit 0
pnpm check:lean-entry-closure :: exit 0
pnpm check:logger-receiver-detach :: exit 0
pnpm check:nul-bytes :: exit 0
pnpm check:object-def-param-keys :: exit 0
pnpm check:objectql-double-limit :: exit 0
pnpm check:org-identifier :: exit 0
pnpm check:page-declaration-shape :: exit 0
pnpm check:platform-object-tenancy-census :: exit 0
pnpm check:published-files :: exit 0
pnpm check:query-options-erasure :: exit 0
pnpm check:refd-timer-probe :: exit 0
pnpm check:registry-log-declared :: exit 0
pnpm check:rest-log-spy-declared :: exit 0
pnpm check:slot-lookup :: exit 0
pnpm check:sourcemap-no-sources-content :: exit 0
pnpm check:system-context-census :: exit 0
pnpm check:test-source-alias :: exit 0
pnpm check:tier-file-adoption :: exit 0
pnpm check:type-check-coverage :: exit 0
pnpm check:type-check-debt :: exit 0
pnpm check:undeclared-dep-imports :: exit 0
pnpm check:vouch-for-reference-callers :: exit 0
pnpm check:watch-hint-literal :: exit 0
pnpm check:where-matcher :: exit 0

Generated by Claude Code

…t only true

relationship/line-items-inline-edit and relationship/association-inline-edit
now ask one local predicate, isInlineEdited (true | 'grid' | 'form'), which
the sibling relationship/inline-edit-needs-bulk rule already restated inline
and now calls too. A line-item child that chose 'grid' or 'form' is no longer
told to switch to inlineEdit: true, and an association declaring 'grid' or
'form' is warned like one declaring true.

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

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

3 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.

What this run could not see
  • the SDK route bridge reached 65 of 247 client-bound route-ledger rows — the other 182 have no registrar path: tail to select them, so pages documenting THEIR client methods cannot appear above, on this or any run. Of those 182: 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; 123 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 — 4 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 a931063df36e283a25ef618885c919e53a096846 → packageMentionDocs.

Which tree this was computed on

This run read content/docs from 4ed448b22f9a0f867971f2213f1b6f2c2fe332dd — the merge of head 21e33be20323b6475f4fe2058acc30cc60d80fff into base a931063df36e283a25ef618885c919e53a096846, 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 4ed448b22f9a0f867971f2213f1b6f2c2fe332dd && git checkout 4ed448b22f9a0f867971f2213f1b6f2c2fe332dd
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin a931063df36e283a25ef618885c919e53a096846 21e33be20323b6475f4fe2058acc30cc60d80fff && git checkout -B drift-repro a931063df36e283a25ef618885c919e53a096846 && git merge --no-ff 21e33be20323b6475f4fe2058acc30cc60d80fff

node scripts/docs-audit/affected-docs.mjs --json a931063df36e283a25ef618885c919e53a096846

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

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmPJxG4vBVaLCBWLcWJ

Flake judgement · 2026-11-17T08:13Z · head 21e33be20323b6475f4fe2058acc30cc60d80fff

Test Core (4/8) (run 44042238228, job 133900139929) went red on one case: packages/lint/src/validate-expressions.flow-null-guards.test.ts:457, "⭐ LIT — on each ownership tier os build judges exactly the injected columns the tier carries, as the door does", Error: Test timed out in 5000ms at 5230ms. Every other lint case passed (9116 of 9117).

Read as a timing flake, not this diff:

  • The case loops three ownership tiers through os build and the door; it runs no code this PR changed (the diff touches only the two inlineEdit advisories and a shared local predicate in data-model-rules.ts, plus a new test file). No assertion failed; the case ran 230 ms over the default timeout on a shard whose lint run reported 614 s of import time.
  • The dev's local run of the full @objectstack/lint suite on this same head passed 9117 of 9117.

Re-running the failed jobs once. A second red on this case is treated as real.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmPJxG4vBVaLCBWLcWJ

Final head · 2026-11-17T08:37Z
Head: 21e33be20323b6475f4fe2058acc30cc60d80fff

  • CI: every check on this head completed, none red. Test Core (4/8) went green on its one re-run (attempt 2, job 133912962896) after the timing flake judged in 6942531202.
  • Scope: packages/lint/src/data-model-rules.ts (both inlineEdit advisories and the bulk rule read one local isInlineEdited predicate: true, 'grid' or 'form'), a new test file, a @objectstack/lint patch changeset. +104 / -4. Rule ids, severities, messages and fix text unchanged; no export added.
  • check-governed-merges --pr 34712: NOT governed. No packages/spec/src/** change, no contract review owed.
  • Premise measured on unmodified main (4 red: line-items 'grid'/'form', association 'grid'/'form'); one ablation per rule turns its two pins red. Gates: 63 derived, 0 NOT-MEASURED (dev report 6942160729).
    Sent to L1 for a first review on this head.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmQtnGcx7hYEL11ptVs

席位核对

L1 first review: ACCEPT · PR #34712 · card #34636 · area o2-A · L1-a2 · 2026-11-17T08:39Z

Head-sha: 21e33be20323b6475f4fe2058acc30cc60d80fff

Final-head comment 6943024021; dev report 6942160729; flake note 6942531202.

Checklist

  • Shape. Draft, base main. Fixes #34636 is the only closing keyword in the body. It is right: the PR delivers all three of the card's Acceptance boxes.
    • Clause-②: no holds. Both rules stay advisories (a suggestion and a warning), and nothing an author writes is refused.
    • Metadata-protocol: none holds as well.
  • Scope (get_files, 3 paths, +104/−4): packages/lint/src/data-model-rules.ts, a new test file, and the changeset. The commits are b125220c and merge 21e33be2, whose git show --remerge-diff is empty.
  • The predicate. isInlineEdited(def) is file-local and not exported. It returns true for true, 'grid' and 'form', which are exactly the three values isBodyTableRelationship (related-list-body-table.ts:59) treats as inline-edited.
    • The card asked to call the spec predicate if possible. The body explains why it does not, and I checked the reason at related-list-body-table.ts:54-60. isBodyTableRelationship returns false for any type other than master_detail (it also admits lookup only through relatedList: 'primary'), and it answers relatedList first. Reusing it would change R5's and R6's reach, so a local predicate for the narrower question is the right call.
    • All three sites in the file now use it: R5, R6, and the inline-edit-needs-bulk loop (:316). The loop previously spelled out the same three values, so its behaviour does not change.
  • R5 (relationship/line-items-inline-edit, :1164). It is now silent for all three values and nudges only on absent or false. The rule id, severity, message and fix are unchanged. A 'grid' / 'form' author is no longer offered a fix that would overwrite their chosen mode.
  • R6 (relationship/association-inline-edit, :1188). It now warns for all three values, not just true. That is the card's second box.
  • Pins. 10 cases: R5 silent on each of the three values, R5 nudging on undefined and false, R6 warning on each of the three values, and R6 silent on undefined and false.
    • Premise. On unmodified main source, 4 fail (the 'grid' / 'form' legs of both rules).
    • Ablations (body). Reverting R5's condition turns its 'grid' and 'form' legs red (2 failed / 8 passed). Reverting R6's condition does the same for R6. Both were restored to blob == HEAD (78bd1208). The true legs and the absent/false legs stay green under each ablation, so they act as the controls.
  • Customer-facing text. skills/objectstack-data/references/lint-rules.md:15,18 describe the two rules as "without inlineEdit" and "marked inlineEdit". That wording does not name a value, so it was already true of all three modes and is now matched by the code. No Skills-docs: line is owed. No other surface states the rules' trigger.
  • Changeset (root .changeset/, @objectstack/lint patch). I checked each sentence against the diff: the three accepted values, R5 silent for any of them, R6 now warning on 'grid' and 'form', and ids, severities and messages unchanged. They match.
  • Gates. 63 derived, 63 run, 0 NOT-MEASURED. The lint package suite reads 215 files / 9117 passed, with typecheck exit 0.

CI on this head

  • check-runs, filter=latest, 70 runs: success=57, skipped=13, nothing red or pending.
  • Flake judgement: accepted. Test Core (4/8) went red on the first run on one case, validate-expressions.flow-null-guards.test.ts:457, timed out at 5230 ms against the 5000 ms limit. The flake note 6942531202 reads it as timing.
    • That case does run every lint rule through os build, so it does pass through this file. But the added predicate is three strict-equality checks, and nothing in the diff could cost 230 ms.
    • A single re-run of the job is success (08:36:56Z), and that is the latest run.

L2 and landing

  • L2: not owed. Nothing under packages/spec/src/**, Clause-②: no, no narrowing (an advisory that fires on more values refuses nothing), and no governed rule text.
  • Landing tier (node scripts/pm/check-governed-merges.mjs --pr 34712): NOT governed — ordinary queue landing, 108 changed lines ≤ 3000. This is not spec surface. The area lands it, and no human approval is needed.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · os-steve · session_01ADHkmPJxG4vBVaLCBWLcWJ

Landing · 2026-11-17T08:40Z · head 21e33be20323b6475f4fe2058acc30cc60d80fff

Probe Reading
check-governed-merges.mjs --pr 34712 NOT governed; 108 changed lines (≤ 3000)
Drift against origin/main the 6 commits on main since the head's base touch data-model-rules* 0 time(s); git merge-tree merges clean

L1 ACCEPT 6943059392 on this head. No packages/spec/src/** change, no contract review owed. Ready for review and auto-merge through the queue; #34636 closes with the merge.

@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review November 17, 2026 08:41
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit f6f5b50 Nov 17, 2026
112 of 114 checks passed
@objectstack-fleet
objectstack-fleet Bot deleted the claude/issue-34636-inline-edit-advisories branch November 17, 2026 09:09
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 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

2 participants