Repository navigation
A decision's mention does not link it to a test or a Markdown page - #224
Merged
Merged
Conversation
zlareb1
force-pushed
the
fix/decision-links-skip-tests
branch
5 times, most recently
from
November 3, 2026 15:16
f5cce12 to
08dc9b6
Compare
zlareb1
force-pushed
the
fix/decision-links-skip-tests
branch
11 times, most recently
from
November 3, 2026 16:50
bf008d2 to
ea0d063
Compare
When only tests or Markdown pages define a decision's code name (a common test, mock or end-to-end layout, or a heading), the extractor links nothing, and the one-file pick never links a test or a page. A mocked op's key in a dashboard test, or a heading in a docs page, resolved a decision's code name to that file, so the pre-edit block showed the decision on edits of the test and never on the code it governs. A name several files define, some of them code, stays unresolved, so leaving tests out never makes a link. The dry run says "only a test or a page defines it" and lists the name as unresolved; a snake_case name a page documents is reported as a setting. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
force-pushed
the
fix/decision-links-skip-tests
branch
from
November 3, 2026 19:01
88c31e6 to
f286ad4
Compare
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):
loom decisions extractno longer links a decision to a test file or a documentation page that happens to define one of its code names, so the pre-edit block shows the decision on the code it governs instead of on that test or page.Why
The extractor resolves each code name a decision states with
code.symboland keeps the one defining file. The code index records definitions in tests (a mocked op's key in a dashboard test) and in prose files (a heading in a docs page) like any other. A decision naming a wire op therefore resolved to a frontend test that mocks the op, and the pre-edit block fired on edits of that test and never on the handler.Measured on a private corpus of 60 real engineering documents across three components, over three extraction runs on
main: 23 of 67 file links the extractor wrote (34%) pointed at a test file or a docs page: 21 at a dashboard test that mocks wire ops by name, 2 at a configuration reference page. The change drops exactly those 23 and adds none.What changes
When only tests or Markdown pages define a code name (a file in a common test, mock or end-to-end directory, or named
*.test.*,*.spec.*,*_test.*or after a test convention such asconftest.pyor a Go mock; a heading in a.md,.markdownor.mdcpage), the decision links nothing; the dry run saysonly a test or a page defines itand lists the name as unresolved (only tests or pages) for a human to add the code file, or as a setting when it is snake_case and a page documents it (also when a test fixture shares its name); a snake_case name only tests define is a helper and is not listed. The exact list isgovernsinserver/memory/domain/decision_extract.py.A name several files define, some of them code, stays unresolved: leaving tests out to pick the remaining code file was tried and measured on the same three runs, and every link it added (8, two names) was wrong, such as a product name resolving to a protocol definition file. So the change only removes links, never makes one; and a mixed name whose class-first pick lands on a test (a test class beside a code constructor) is unresolved too.
The test rule errs toward keeping a link: a test layout it does not list keeps its link to the test, as before. Code laid out like a test reads as one: a library under a
test/directory (a test framework's own code), a module named*_test(self_test.c) or kept undere2e/. Unlike the code index'sis_test_unit_path, it does not take a module namedtest_*or*Testfor a test, since source modules are named that way (test_gate.py), and aspecdirectory is code (a target-spec module, a protocol spec). Only Markdown counts as prose, because it is the only text format whose headings the index records as definitions;CMakeLists.txtand other text files it reads as code keep their links.Scope and risk
code.symbol, the code linker andmemory.for_fileare untouched.detect_value_files), as before.Compatibility, rollout and rollback
loom decisions extracton a document corrects the files of its extracted rows that are not pinned or attested; a pinned or attested row, or one with a recorded outcome, is never re-recorded by a re-run, so its files are corrected by hand.Tests
test_*.pysource module,CMakeLists.txtand a header in); a dry run reports a name only a test or a page defines, labels a snake_case one a page defines a setting and one a test defines not, and leaves a name defined in a test and in code unresolved (tests/unit/test_decision_extract.pywith the copy, link and contract gates). Full unit and analyzer suite on the head: 25949 passed, 22 skipped, 1 xfailed, 0 failed.make format lintclean;test_public_copy.pyandtest_doc_links.pypass.AI assistance in the code (leave one; writing this description with AI is fine):
🤖 Generated with Claude Code