fix: render scalar catalog titles and canonicalize rg inbound paths (#72) (#73) - #74
Merged
Merged
Conversation
) (#73) Two defects the SAC v0.5.4 fixes exposed in the shared renderer and the shared rg accelerator. #72: `_escape_link_label()` assumed a string, so a concept with `title: 421` aborted catalog rendering after capture had already written concepts. It now normalizes to text at the boundary. `fm_c.get("title") or p.stem` also sent a falsy-but-real title (`0`, `false`) to the file stem. Both renderers now share one `_catalog_label()` helper, so the fallback rule cannot drift between them. PKC has two renderers, so patching only `refresh_catalog_index` would leave first-time catalog creation broken. #73: `rg_list_files()` resolves its hits, but `_inbound_via_rg()` derived `src` with `path.relative_to(bundle)`. A bundle reached through a symlink alias made that raise, and the handler silently dropped a real inbound edge while the pack still reported `reverse_index: rg`. `resolve_knowledge_root()` returns an absolute `--bundle` verbatim, so this was reachable from the CLI. Both regression tests are red without the corresponding fix. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TZ1sCoZonCJw2oPbPcPioW
mkdtemp yields the /var alias on macOS but a plain /tmp path on Linux, so the regression assertion was inert on CI — the platform it most needs to cover. Create the symlink explicitly and address the bundle through it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TZ1sCoZonCJw2oPbPcPioW
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.
Fixes #72. Fixes #73.
Both are the PKC instances of the two defects fixed in system-architecture-capture v0.5.4.
#72 — scalar catalog titles
_escape_link_label()assumed a string, so a concept withtitle: 421aborted catalog rendering withAttributeError. Capture and ingest write concepts before refreshing indexes, so the failure left a partially updated bundle.PKC has two renderers.
refresh_catalog_index()andensure_catalog_index()both built the label, so patching only the first would leave first-time catalog creation broken. Both now call one_catalog_label()helper, which also fixes the quieter half of the bug:title or p.stemsent a falsy-but-real title (0,false) to the file stem.#73 — rg inbound paths
rg_list_files()resolves the paths it returns._inbound_via_rg()derivedsrcwithpath.relative_to(bundle), which raises when the bundle is addressed through a symlink alias. The handler silently continued, dropping a real inbound edge, while the pack still reportedreverse_index: rg.resolve_knowledge_root()returns an absolute--bundleverbatim, so this was reachable from the CLI:is_concept_path()in the same loop already resolved both operands, so the boundary was inconsistent within one body.Verification
100 tests pass. Both new tests are red when the two script files are stashed:
🤖 Generated with Claude Code
https://claude.ai/code/session_01TZ1sCoZonCJw2oPbPcPioW