Repository navigation
loom decisions extract links a document in any namespace to a named repository - #189
Merged
Merged
Conversation
A design document added to a person's or a team's namespace has no code index there, so every decision it yielded had no files and never reached the pre-edit block. --repo OWNER/NAME resolves the document's code names in the repository's trunk code namespace; --into source writes the rows beside the document tagged repo:<id> (the tag memory.for_file matches for the coding plugins), --into repo writes them to the trunk, citing the document in its own namespace. Reconcile and retire reads run where the rows go. The run checks read on the document's and the repository's namespace and write where the rows go, and refuses on a failed check. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… behind A pinned or attested row, or one with a recorded outcome, is never recorded again, so it gains the repository's tag by the same tags-only write that sets or clears source-changed. Reconcile and retire read one namespace, so a run refuses before any model call when this document's rows from an earlier run are in the other namespace a run may write them to, or when a run without --repo finds them tagged with a repository. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…other namespace A row whose reasoning is still in the document but that the model did not emit again, and a kept row the retire step tags source-changed, gain the repository's tag too, so every row of a linked document reaches the pre-edit block. A run that cannot read the other namespace a document's rows may be in is refused without saying whether rows are there. The feature page names the two cases the check does not cover. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
… read Rows tagged with one repository are no longer re-tagged or re-recorded for another; the run says which repository they are linked to. The repository's tag comes from whichever of its entries names the remote, its trunk from the same helper the search legs use, and rows in the trunk itself carry no tag. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…unknown repository Another writer's unconfirmed row citing the document is left as it is, as the extractor revises only its own. A repository the caller may not read gets the same answer as one that is not configured. An --into repo record carries no empty tag, and a flagged row that gains the repository's tag is reported without a reason it does not have. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
A run without --repo looks up the trunk of a branch namespace, which needs the repositories added from the dashboard: the snapshot is read before any lookup. The refusal for rows linked to another repository names it by owner/name. The repository's tag comes from the entries spelled as the trunk's, and each namespace's access is checked once. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…epositories A run that could not read the repositories added from the dashboard would see no trunk for a branch namespace and skip its check, so it refuses (registry_read). The refusal for rows linked to another repository names it only when the caller may read it. Docs, help and docstrings say which rows gain the repository's tag. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…pace A document in a release branch's code namespace may have its rows in that repository's trunk; a run naming another repository now finds them there and refuses, naming no flag it cannot know. The access check uses the default refusal marking: the refused run is the whole answer, so an unverifiable grant counts as the server's failure. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…-1 reason Rows an --into repo run wrote to a repository other than the one whose code namespace holds the document are not seen by a later run that drops or changes --repo, whatever namespace the document is in. The help and exit_code list --into without --repo, a repository with no remote and an unread registry. The registry's read state is a flag, not a comparison with the start value. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
The pre-edit hook reads the session's own namespace and the repository's trunk, so a row beside the document reaches a session working from that namespace; a team's shared document goes in with --into repo. The refusal path reads each repository's name and trunk in one pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
A confirmed row another writer linked to a repository keeps that link alone when the extractor flags or keeps it. A caller who cannot read a branch's trunk is refused without its name. Naming a linked repository in a refusal does not mark the request the server's. 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]>
Its rows would resolve against the named repository's code and be linked and read as the other repository's. The refusal prints a linked repository as owner/name, and the retire step writes a kept row's tags through one helper. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…out it Whether the namespace is a code namespace, or another repository's, shaped the answer to a caller who could not read it. The report comment says which step's tag writes `linked` holds. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…namespaces Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ps at one row 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]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…gged there 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]>
… read by namespace Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…a kept row's tags Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
…ds the row back whole 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]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
zlareb1
force-pushed
the
feat/decision-extract-repo
branch
from
November 3, 2026 11:17
b3a86f9 to
65b4d3e
Compare
…cument 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]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: zlareb1 <[email protected]>
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 extract --repo OWNER/NAMElinks a design document kept in a person's or a team's namespace to a repository: its code names resolve in the repository's trunk index, and--into source(rows beside the document, taggedrepo:<id>) or--into repo(rows in the repository's trunk namespace) chooses where its decisions go, so the pre-edit block serves them.Why
The extractor looked code names up with
code.symbolin the document's own namespace. A design document added withknowledge.addto a person's or a team's namespace has no code index there, so every decision was written withfiles: []and never reachedmemory.for_file, the pre-edit path.Extraction now takes the repository separately from the document's namespace (
Targetinserver/memory/app/decision_extract.py: the document's namespace, the code namespace, the namespace rows go to and the tag they carry):--repois matched the waycode.reposmatches a checkout's remote (repo_slug), in the run's org, to the repository's trunk code namespace (trunk_namespace_of) and itsrepo:<id>tag (repo_tag, the tag the plugins compute, from whichever entry names the remote). Rows written into the trunk itself carry no tag. The new helper isrepo_trunkinserver/code/app/repo_scope.py.--into source(the default when the document is outside a code namespace) writes beside the document with therepo:<id>tag;memory.for_filematches the caller's namespace withhasAny(tags, …), so the hook's[project:<p>, repo:<id>]body serves the row to whoever reads that namespace.--into repo(the default for a document in a code namespace) writes to the trunk, where every repository reader gets it as a foreign row.source_resource_idstill cites the document in its home namespace. There is no per-document access, so a repository reader who cannot read the document's namespace sees the quote but is refused the cited document; the CLI help and the feature page say so.cites_documentreads the document's namespace._same_rowcomparesrepo:tags as it compares theconstrainttag, so the extractor's own unconfirmed row extracted before it had a repository is revised once to carry it. A row the run keeps as it is (pinned, attested or with a recorded outcome, or kept by the retire step because its reasoning is still in the document) gains the tag by the tags-only write that already sets or clearssource-changed(_keep_tags,_flag, one write per row).--repo, its trunk), or when they carry another repository'srepo:<id>tag (any, for a run without--repo). Going on would leave the document's decisions in two places, or linked to the wrong repository. The feature page names the two cases the check cannot see (rows an--into reporun wrote, when a later run on a document outside any code namespace drops or changes--repo; two concurrent runs with different--into). Moving rows between namespaces is left to the operator (memory.deletethere, then a re-run).--repo: unchanged; the document's namespace is all three.Scope and risk
row_in_scope, which fails closed (_mayturns a failing check into a refusal). The CLI runs in-process with no auth context, so as before the operator passes every gate; the checks bind as soon as a caller with an auth context runs the function. There is no op for extraction today, so no wire surface changes.--into repocopies a decision's quote into the trunk namespace; it widens who reads that quote to the repository's readers, by the operator's choice. It never widens who can read the document.--intowithout--repo, an unknown repository, or a repository with no remote to tag rows with (--into sourceonly) exits 1 before any model call.--into reporows belong to the trunk: erasing the document's namespace leaves them (the feature page says so).memory.for_file, the plugins.Compatibility, rollout and rollback
--repoand--intoonly).--repostay as they are; a later run without--reporevises them to drop the tag.Tests
tests/unit/test_decision_extract.py: symbol lookups go to the trunk, rows go to the document's namespace with the tag (--into source) or to the trunk citing the document's home (--into repo), the code-namespace default, reconcile reads in the target namespace, a row revised to gain the tag, refusals without read on the repository or the document's namespace and without write where rows go, a failing access check refusing, unknown repository and--intowithout--repo, unchanged behaviour with no--repo, a pinned row and a row with a recorded outcome gaining the tag by a tag write (dry run reports it), a contradicted pinned row flagged and tagged in one write, the refusals when the document's rows are in the other namespace, and a run without--repoover tagged rows.repo_trunkmatches owner/name and an SSH remote, picks the trunk over a release branch, and stays in its org.tests/integration/test_decision_extract_repo.py, against a local ClickHouse: a synthetic design document added withknowledge.addto a person's namespace names a class of a fixture repository indexed at its trunk; extraction with--into sourceand--into reporesolves the class to its file, andmemory.for_filewith the plugin hook's body serves the row to a reader of the namespace it went to, and not to a session tagged with another repository, a reader of another namespace, or a caller who cannot read the trunk.make format lint typecheck,scripts/codegen/docs_reference.py --check, the CLI snapshots,test_public_copy.py,test_doc_links.py,test_package_contracts.py.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 namespace each read and write goes to, and the gates, were checked against the unit and integration tests above.
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.docs/reference/configuration.mdand thedocs/reference/tables (python scripts/codegen/docs_reference.py), the reach manifest,schemas/schema.sql(make schema-dump) and the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py).main; no merged migration is edited.hooks/,lib/,bin/,skills/,.mcp.json, the Codexplugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.npm --prefix frontend run build) and its tests pass, iffrontend/changed.docs/describe the system as it now is, and this description names any operator steps and wire changes.tests/unit/test_public_copy.py).git commit -s), as CONTRIBUTING.md asks.🤖 Generated with Claude Code