Skip to content

Diagnostics for an explicit CONCAT/JOIN on an anchor without a record - #4

Merged
shigarov merged 1 commit into
mainfrom
feature/diag-anchor-without-record
Aug 29, 2026
Merged

Diagnostics for an explicit CONCAT/JOIN on an anchor without a record#4
shigarov merged 1 commit into
mainfrom
feature/diag-anchor-without-record

Conversation

@shigarov

Copy link
Copy Markdown
Contributor

Closes TODO item 2 (plan DIAG_ANCHOR_WITHOUT_RECORD).

Summary

  • An explicit CONCAT/JOIN (written on the anchor's own content spec) whose anchor has no record, or none of whose provided items has a record, was skipped silently — the anchor just vanished from the recordset. Both cases are now reported through TableInterpreter.diagnostics() (anchor has no record — REC missing?, none of the provided items has a record — REC missing on the provider side?) and raise under withStrictPreconditions(true).
  • Inherited actions (row/subrow/subtable/table-level actSpecs) stay silent — for them anchors without records are routine.
  • Anchors whose record was folded away by an earlier CONCAT are tracked in the new set C (WorkingState.isConcatenated / allConcatenated, the counterpart of J) and are not reported either — otherwise every folded row of BW&STR*->CONCAT(0) patterns would be a false positive.
  • Semantics of the operations is unchanged; the manuscript, grammar and conformance corpus are untouched.

API

  • InterpretationAction.inherited() — new fourth record component; the three-argument constructor is kept (inherited = false). Positional deconstruction patterns need a fourth binding (noted in CHANGELOG).
  • WorkingState.report(anchor, operation, message) (was private skip), isConcatenated, allConcatenated.

Tests

  • New WorkingStateDiagnosticsTest; six end-to-end cases in TableInterpreterMultiRecordTest.
  • The task corpus (RtlTask*Test, AtpTask*Test) and the semantic conformance runner now assert that interpretation produces no diagnostics — 2164 tests green, no diagnostics on the corpus.

Docs

docs/model/itm.md, docs/rtl-reference.md (the Example 6 snippet in the cheat sheet was missing ()->REC — fixed), docs/api.md, docs/examples.md, CHANGELOG.md.

🤖 Generated with Claude Code

An explicit CONCAT/JOIN whose anchor has no record (REC missing), or none
of whose provided items has a record, was skipped silently. Both cases are
now reported through TableInterpreter.diagnostics() and raise under strict
preconditions. Inherited actions stay silent; anchors folded away by an
earlier CONCAT are tracked in the new set C (WorkingState.isConcatenated /
allConcatenated) and are not reported either.

- InterpretationAction.inherited (3-arg constructor kept)
- WorkingState.report (was private skip), concatenated set C
- TableInterpreter.checkRecords before applyConcat/applyJoin
- task corpus and semantic conformance runner assert no diagnostics
- docs, CHANGELOG; rtl-reference Example 6 snippet restored ()->REC

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@shigarov
shigarov merged commit 4d90bf2 into main Aug 29, 2026
2 checks passed
@shigarov
shigarov deleted the feature/diag-anchor-without-record branch August 29, 2026 02:58
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