Skip to content

feat(desktop): planner datasource-qualified fields + apply-side datasource selection (a2td #220+#219 port, seam-1 packet B)#540

Merged
mattcfilbert merged 3 commits into
feature/desktopfrom
claude/seam1-port-b
Jul 17, 2026
Merged

feat(desktop): planner datasource-qualified fields + apply-side datasource selection (a2td #220+#219 port, seam-1 packet B)#540
mattcfilbert merged 3 commits into
feature/desktopfrom
claude/seam1-port-b

Conversation

@mattcfilbert

Copy link
Copy Markdown
Contributor

Port-wave packet B — STACKED on #539 (packet A); merge #539 first, then retarget this to feature/desktop (or merge in sequence). Completes the seam-1 multi-datasource port for the binary.

#220 half (planner): fields accepts exact column_ref strings OR {query, datasource?} objects; resolution cache keyed on (query, selector); worksheet task specs carry the resolved common datasource; ambiguous AND not_found both block the plan — closes the audit-verified hole where not_found-only still produced a plan with a warning.

#219 half (apply): buildAndApplyWorksheet derives the rewrite datasource from explicitBind.datasource — the caption/first-workbook-datasource regex grab is deleted; the no-manifest passthrough infers a single datasource from the provided refs (shared parser from #539) and fails closed on mixed refs with a prescriptive block; injectTemplate blocks a caller DATASOURCE that disagrees with the resolved mapping's datasource instead of silently using it.

Characterization re-baselines (deliberate, 2): buildAndApplyWorksheet.characterization.test.ts:253 and :265 — old pins asserted caption-first/first-non-Parameters datasource selection (the defect); new pins assert common-ref-datasource selection, each commented with the invariant it now pins.

Validation (orchestrator, firsthand): full suite 4,368 green (298 files), wrong-bind invariant suites 210 green, tsc clean, lockstep 6/6, eslint clean. Zero contact with #538's receipt-formatting overlap in the shared file — verified conflict-free.

🤖 Generated with Claude Code

mattcfilbert and others added 2 commits July 17, 2026 18:13
…#217+#222 port, seam-1 packet A)

Port-wave packet A from the content audit. #222 half: exported
COLUMN_REF_REGEX + parseDatasourceQualifiedColumnRef /
parseColumnInstanceRef / parseCanonicalColumnRef /
formatCanonicalColumnRef in field-resolver (same API as a2td), private
regexes in fields.ts / explicit-bind.ts replaced; preserved divergence
(explicit-bind accepts bare [deriv:Base:sfx], fields require qualified);
colon-tolerant instance parsing (fixes [Profit:Ratio] -> [Profit]
mis-parse, caught by minion red run). #217 half: resolveField and
proposal-binding resolveInSummary recognize exact canonical column_ref
FIRST — hit resolves exact, ref-SHAPED miss fails closed (never falls to
fuzzy); datasource selector matches internal name or UNIQUE caption
(ambiguous caption refuses with guidance, Parameters excluded). Gate 5b
closure untouched; listAvailableFields untouched (#535's file).

Version 2.25.4 assumes #538 (2.25.3) merges first — resolve upward on
conflict.

Cursor-minion port (gpt-5.5-high), orchestrator-adjudicated: full suite
4,362 green firsthand, all 3 wrong-bind invariant suites green (210),
tsc clean, lockstep 6/6, eslint clean (4 fixable errors fixed at
adjudication).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ource selection (a2td #220+#219 port, seam-1 packet B)

Port-wave packet B, stacked on packet A (#539). #220 half: planner
fields accept exact column_ref OR {query, datasource?}; resolution
cache keyed on (query, selector); task specs carry the resolved common
datasource; ambiguous AND not_found both block the plan (closes the
audit-verified hole where not_found-only still planned with a warning).
#219 half: buildAndApplyWorksheet derives the rewrite datasource from
explicitBind.datasource — the caption/first-workbook-datasource regex
grab is DELETED; no-manifest passthrough infers a single datasource from
the provided refs via the shared parser and FAILS CLOSED on mixed refs
with a prescriptive block; injectTemplate blocks caller DATASOURCE that
disagrees with the resolved mapping datasource. Two characterization
pins deliberately re-baselined (caption-first -> common-ref datasource),
each with a comment naming the new invariant. Zero contact with the
receipt-formatting area (#538's file overlap — verified no conflict).

Cursor-minion port (gpt-5.5-high), orchestrator-adjudicated: full suite
4,368 green firsthand, invariant suites 210 green, tsc clean, lockstep
6/6, eslint clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Base automatically changed from claude/seam1-port-a to feature/desktop July 17, 2026 22:49
…ttified test from base

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@mattcfilbert
mattcfilbert merged commit f4dfe45 into feature/desktop Jul 17, 2026
3 checks passed
@mattcfilbert
mattcfilbert deleted the claude/seam1-port-b branch July 17, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant