Repository navigation
fix(lint): the inline-edit advisories read every inline-edit mode, not only inlineEdit: true - #34712
Conversation
…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
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmPJxG4vBVaLCBWLcWJ
📓 Docs Drift Check3 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
Coarse fallback — 4 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # 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 |
|
repo:objectstack#2 · os-steve · session_01ADHkmPJxG4vBVaLCBWLcWJ Flake judgement · 2026-11-17T08:13Z · head Test Core (4/8) (run 44042238228, job 133900139929) went red on one case: Read as a timing flake, not this diff:
Re-running the failed jobs once. A second red on this case is treated as real. |
|
repo:objectstack#2 · os-steve · session_01ADHkmPJxG4vBVaLCBWLcWJ Final head · 2026-11-17T08:37Z
|
|
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: Final-head comment 6943024021; dev report 6942160729; flake note 6942531202. Checklist
CI on this head
L2 and landing
|
|
repo:objectstack#2 · os-steve · session_01ADHkmPJxG4vBVaLCBWLcWJ Landing · 2026-11-17T08:40Z · head
L1 ACCEPT 6943059392 on this head. No |
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'时又收不到警告。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.inlineEditacceptstrue,'grid'and'form', and every reader treats all three as inline-edited (the console's inline subforms read any truthy value; the spec'sisBodyTableRelationshipand the siblingrelationship/inline-edit-needs-bulkrule spell out all three). Two advisories inpackages/lint/src/data-model-rules.tsread only the literaltrue:relationship/line-items-inline-editfired oninlineEdit !== true. A*_linechild whosemaster_detaildeclares'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 wheninlineEditis absent orfalse, which is the case its message and fix are written for.relationship/association-inline-editfired oninlineEdit === 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-bulkloop, 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:isBodyTableRelationshipanswers a different question (it also readsrelatedList, and only formaster_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.mdalready describes the corrected behaviour ("withoutinlineEdit" / "markedinlineEdit"), so no doc edit is needed. Theinline-edit-needs-bulksite is a behaviour-identical refactor.Tests
New file
packages/lint/src/data-model-rules.inline-edit-advisories.test.ts, 10 cases:true,'grid','form'; it suggests (severitysuggestion, pathobjects[1].fields.order.inlineEdit) for absent andfalse.warning, same path, exactly one finding) fortrue,'grid','form'; it is silent for absent andfalse.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 thetrue, absent andfalsecontrols were green:Ablation, one per rule (scripts/ablation-replace.mjs, mutation landed and restored, verified on disk)
The test imports
./data-model-rules.jsfrom source, not through a package'sexports, so no dist rebuild leg applies.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 HEADempty.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 HEADempty.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 thetsconfig.test.jsonprogram (--listFilesOnlycount 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
@objectstack/lintpatch. Nothing an author can write changes (Metadata-protocol: none). An advisory now fires on two more accepted values, soClause-②: no.Verification
Reads below are on head
21e33be203(merge of origin/main a34eb07), after a fullpnpm 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.--ranreconciliation:63 derived, 63 run, 0 NOT-MEASURED, 0 UNRUN(a derived zero; every line carries an exit code).check:dual-build-cjs-loadsandcheck:lean-entry-closureat exit 3 (PREREQUISITE NOT MET: no repo-widedist/). After a full build both measured exit 0. On this head both measure exit 0 in the same pass as the rest.check-platform-checklist --changed-fromis 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)
Generated by Claude Code