Skip to content

fix(lint): kanban group-field hint offers a grid grouping only where the engine accepts it - #38635

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-38433-kanban-group-hint
Nov 29, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-38433-kanban-group-hint

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread
Refs #38433 (items 1, 2)
Clause-②: no
Metadata-protocol: none

维护者速读

  • 作者与智能体在校验或保存看板视图时看到的修复建议变了:分组字段是多值、JSON 存储或公式字段时,不再建议改用表格分组,而是建议改用表格列;普通文本、数字、日期字段的建议不变。
  • 属于看板分组字段校验规则的复核跟进:原建议会把作者引到一个打开即报错的表格分组。
  • 只是提示文字和规则说明变了,不改任何校验结论或严重级别;出错时作者只会读到不准确的建议,可直接撤回。
  • 无。

What changes

list-view-kanban-group-field-uncategorical now offers the grid-grouping remedy only on the branch where it holds.

  • Hint (checkKanbanGroupField, packages/lint/src/validate-list-view-field-refs.ts): the tail is keyed on the engine's own refusal set, read from the same spec predicates the two engine.aggregate doors use:
    • multi-valued (isMultiValueField, the multi branch) and structured-JSON (STRUCTURED_JSON_TYPES) are refused by assertGroupByNamesNoJsonStoredField;
    • virtual formula (isVirtualSearchField) is refused by assertGroupByTargetsAreStored;
    • both answer 400 INVALID_FIELD. A list view grouping compiles to that group-header query (compileListViewGroupQuery), which the grid sends.
    • For those three classes the hint now ends or show "FIELD" as a grid column (a list cannot be grouped by REASON); every other warned field (text, number, date and the rest of the stored single-valued scalars) keeps or show "FIELD" as a grid grouping.
  • Explanation (rule-explanations.ts, this rule's entry only): the fix paragraph now says the same, branch by branch: stored single-valued field gives grid grouping; multi-valued, JSON-stored or formula gives grid column only, with the reason.
  • Measured from the rule's code: before this PR a JSON-stored or formula group field already warned, on the single-valued branch (it is not in KANBAN_CATEGORICAL_TYPES), and got the grid-grouping tail. No finding, severity or accept set changes.
  • N2 (item 4), decided: keep the short list deliberately. select, boolean and lookup are the heads of the three families the rule accepts (select/radio, BOOLEAN_VALUE_TYPES, REFERENCE_VALUE_TYPES). Naming each member would hand-copy KANBAN_CATEGORICAL_TYPES into prose that drifts from it, and would lengthen a hint held to 200 characters.

Read first, by risk:

  1. packages/lint/src/validate-list-view-field-refs.ts, the ungroupable / gridRemedy hunk in checkKanbanGroupField: this is where the set is keyed.
  2. packages/lint/src/validate-list-view-kanban-lanes.test.ts, the new per-field it.each.

Two-minute check: pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2 src/validate-list-view-kanban-lanes.test.ts. Expect 34 passed. The tags, watchers, meta, address and score rows assert a grid column; amount, due_date and subject assert a grid grouping.

Tests

At head e0e643722a:

@objectstack/lint: full suite and typecheck
  • pnpm --filter @objectstack/lint exec vitest run --maxWorkers=2: Test Files 246 passed (246), Tests 9962 passed, 5 skipped (9967).
  • pnpm --filter @objectstack/lint typecheck: exit 0; check:test-typecheck OK.
  • src/validate-list-view-kanban-lanes.test.ts: 34 passed.
Ablation

Forced gridRemedy to always take the grid-grouping arm, on disk, then ran the target file: 5 failed / 29 passed. The failures were exactly the five ungroupable rows (tags, watchers, meta, address, score). Restored with git checkout HEAD --, tree clean.

Acceptance notes

  • Item 3 of the card (a finding of its own for a grouping.fields[].field naming a multi-value, JSON-stored or non-stored field) is not in this PR. It is a narrowing and stays on the card.
  • engine.aggregate also refuses a groupBy on a credential or internal-flagged column (rejectCredentialEvaluation, rejectInternalFieldEvaluation). The hint is not keyed on those, because the refusal comes from a flag and not from the storage class. A kanban board grouped by a password field is not a realistic producer. Noted only.

Verification

Derived local gates (dispatch-gates --commands, 70 families)

Generated by Claude Code

…the engine accepts it

Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmSwS4mQyXWrddL4r6B
@github-actions github-actions Bot added size/s 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 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

1 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
  • 1 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 — 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 cb99e2d627c48ab7703d97ba800409624bc8e763 → packageMentionDocs.

Which tree this was computed on

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

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

⚠️ 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#3 · os-steve · session_01ADHkmSwS4mQyXWrddL4r6B

Final green head · 2026-11-29T17:37Z · zone o3-B · e0e643722ad8814c2fabce64ae1046be96cbd90b · check-runs 59 success · 11 expected skip · 0 failed · 0 pending; mergeable_state clean; l1-face CLEAN. Sent to L1-a for the first review (67 changed lines with a code change, over the self-L1 bar). Body line Refs #38433 (items 1, 2): on merge the card is released back to pm:queue with item 3 remaining.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmQm8PTU4AkVU5kdwEv
L1-a, the seat's L1 thread · 2026-11-29T17:41Z · first review

席位核对

ACCEPT @ e0e643722ad8814c2fabce64ae1046be96cbd90b (card #38433, items 1 and 2, zone o3-B). No L2 is owed: the diff touches only packages/lint/src/** and .changeset/**. That is no packages/spec/src change, no governed path, and the body declares Clause-②: no and no narrowing. The zone lands it.

Read at head:

  • Predicates match the engine. ungroupable keys on the same spec predicates the two engine.aggregate doors use. The multi branch and STRUCTURED_JSON_TYPES (packages/spec/src/data/field-value.zod.ts:350) are the jsonStoredGroupTargets set behind assertGroupByNamesNoJsonStoredField (packages/objectql/src/group-by-structured-json-door.ts:173). isVirtualSearchField (SEARCH_VIRTUAL_TYPES = {'formula'}, packages/spec/src/data/search-fields.ts:115) is the predicate in assertGroupByTargetsAreStored (packages/objectql/src/aggregate-query-shape-door.ts:216). So the hint offers a grid grouping exactly where the engine accepts one.
  • Explanation. The rule-explanations.ts entry is edited for this rule only, and it says the same thing branch by branch.
  • Tests. I ran the full lint suite at this head: 246 files and 9962 tests passed. I also reran the ablation myself: forcing gridRemedy to the grid-grouping arm turns exactly the 5 ungroupable rows (tags, watchers, meta, address, score) red. The new rows test the change itself.
  • Mechanical face. l1-face is CLEAN. Checks at this head: 59 success, 11 expected skip, 0 failed.
  • Card relation. Refs #38433 (items 1, 2) is the sanctioned partial-delivery spelling. Item 3 is a narrowing and stays on the card. N2 (keep the short type list) is decided with a reason in the body, and that is accepted.
  • Changeset. I read it sentence by sentence and it matches the code: multi-valued, JSON-stored and formula fields now get a grid column, the refusal is 400 INVALID_FIELD, and os explain agrees. @objectstack/lint is published and ships dist, which is built from the touched src file, so a patch bump is right.
  • Out of scope. The engine's credential and internal-flag groupBy refusals are written up in Acceptance notes and not keyed in the hint. That disposition is accepted, since no realistic board is grouped by one of those.

Nits (non-blocking):

  • The hint words the formula case "a field computed on read", while the explanation and changeset say formula. Both are right; the hint is just less specific.
  • mergeable_state read unknown at review time. Read it again before landing.

Landing note: this is a partial delivery. After merge, release the card in one stroke (Release:, back to pm:queue, assignee cleared) so item 3 can be picked up.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#3 · os-steve · session_01ADHkmSwS4mQyXWrddL4r6B

Landing · 2026-11-29T17:42Z · zone o3-B · head e0e643722ad8814c2fabce64ae1046be96cbd90b · ACCEPT → PR #38635 comment 7259893900 (L1-a)

Reading Value
check-runs at head (pr-state) 59 success · 11 expected skip · 0 unexpected skip · 0 failed · 0 pending; mergeable_state clean (re-read at landing, as the review asked)
check-governed-merges --pr 38635 · K NOT governed, 67 changed lines (+64 / -3) · landing-k OK, K = 4 < 15, no shared book moved

State: ready for review + auto-merge in this stroke. Body says Refs #38433 (items 1, 2), so the card stays open; on merge it is released back to pm:queue with item 3 remaining. L1-a's wording nit ("a field computed on read" in the hint, formula elsewhere) is non-blocking and not pushed.

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/s 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