Repository navigation
A tracker source that lacks a feature column reads it as a default, so its PR-file reads no longer fail - #477
Merged
Conversation
…o its PR-file reads no longer fail The record contract lists `github_prs.diff` and `affected_file_paths` as the optional `bisect` feature, but a source that lacked them got no projection for them, so every statement that names them (pr_files, prs_touching_paths, pr_change, the bisect scans) failed with Code 47. A feature column the source lacks now reads its type's default and is reported as defaulted: the reads answer as for a PR that touched no file, and the feature and its capability stay absent. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ed_at, feature columns resolve aliases first Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
force-pushed
the
fix/tracker-feature-column-defaults
branch
from
November 10, 2026 12:32
6a0a777 to
199247b
Compare
This was referenced Nov 10, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
A tracker source whose
github_prslacksaffected_file_pathsordiffno longer fails every read of a PR's files (pr_files,prs_touching_paths,pr_changeand the bisect scans) withUnknown expression or function identifier. The contract check reports the columns as defaulted, and the reads answer as for a PR that touched no file.Why
On a source whose
github_prshas neither column, every statement that names them fails:tracker pr_files failed,tracker prs_touching_paths failed,tracker pr_change failedwithCode: 47 ... Unknown expression or function identifier affected_file_paths.Where the column comes from:
github_prsis the tracker source's own table (the record contract,docs/features/tracker/record-contract.md). Loom reads it through the source's credential.diffandaffected_file_pathsas the optionalbisectfeature. The contract check reported the feature absent, but did not alias or default its columns, as it does for a missing triage orsrc_componentscolumn. So the table reference got no projection for them, while the statements still named them.The fix, in the contract check (
diffinserver/tracker/domain/contract.py): a feature column the source lacks now goes through the aliases first, as a missing contract column does, and else reads its type's default ('',[], the defaults the contract already uses). A default lands indefaultedlike any other, so:pr_filesreturns no paths,prs_touching_pathsno PR, andpr_changeno files or hunk contexts.has_columnis False for a default), and the report saysdefaulted github_prs.{diff, affected_file_paths}.merged_atgets an alias instead of a default:if(is_merged = 1, closed_at, toDateTime64(0, 3)), which a mapped tracker already derives (mapping.py). Every source has both columns. A default at epoch 0 would have turned the merge-window reads (link_pr_candidates,cause_statements,backport_wanted_prs) into silent empty answers.A missing
embeddingreads[]. The vector reads already skip a zero vector (arraySum(arrayMap(x -> abs(x), embedding)) > 0), so the vector leg answers no neighbour.A deployment upgraded from an older release needs nothing. The report is computed in process from
system.columnsat each contract check, so the first check after the upgrade carries the defaults. No migration or stored state is involved.Scope and risk
bisect's,merge_time'smerged_atthrough its alias, andvector'sembedding).table_expr).Compatibility, rollout and rollback
defaultednames the feature columns a source lacks;featuresandcapabilitiesare unchanged.Tests
tests/unit/test_tracker_contract_aliases.py:bisectfeature and capability stay absent, and the summary names them.pr_files,prs_touching_pathsandpr_changerun on clickhouse-local against agithub_prswithout the columns, through the contract check and_rows' rewrite, and answer empty. Onmainthe first fails with the deployment'sCode: 47.merged_ataliases it, and on clickhouse-localbackport_wanted_prsfinds the PR merged in its window and not the one closed unmerged.embedding:similar_vectoron clickhouse-local answers no neighbour.tests/unit/test_tracker*.py,test_cli_tracker_contract_check.py, the bisect tests and doc links: 847 passed.make format lint typecheck.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated (an agent wrote most of the diff): Claude Code. The failing statement was reproduced on clickhouse-local with the source's shape.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist
make format-check,make lint,make typecheckandmake test-unitpass; the integration suite passes if server behaviour changed. (Format, lint, typecheck and the tracker and bisect unit tests were run; CI runs the rest.)main; no merged migration is edited. (No migration.)frontend/changed. (Unchanged.)docs/describe the system as it now is, and this description names any operator steps and wire changes.git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code