fix: normalise git_remote fallback so --include-unattributed guard fires (#2353) - #2360
Open
vryahn wants to merge 1 commit into
Open
fix: normalise git_remote fallback so --include-unattributed guard fires (#2353)#2360vryahn wants to merge 1 commit into
vryahn wants to merge 1 commit into
Conversation
…res (garrytan#2353) buildTranscriptPage stored the raw git remote ("" on resolution failure) in page.git_remote while the frontmatter and slug already used the "_unattributed" fallback. The skip guard compares page.git_remote against "_unattributed", so unattributable sessions always imported and the skipped (unattrib) counter always read 0. Normalise once at the source, matching what buildArtifactPage already does. Adds a regression test: an unattributable session run without --include-unattributed is skipped, counted, and never reaches the gbrain staging dir. Fixes garrytan#2353 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
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.
Problem
buildTranscriptPagestores the raw git remote (""when resolution fails) inpage.git_remote, while the frontmatter and slug already apply the"_unattributed"fallback. The skip guard compares against the fallback string:"" === "_unattributed"is always false, so the branch is dead: unattributable sessions import despite the default policy, and theskipped (unattrib)counter always reads 0.Fix
Normalise once at the source (
bin/gstack-memory-ingest.ts), matching whatbuildArtifactPagealready does:Test
Regression test in
test/gstack-memory-ingest.test.ts: an unattributable session (cwd with no resolvable remote) run without--include-unattributedis skipped, reported asskipped (unattrib): 1, and never reaches the gbrain staging dir.test/gstack-memory-ingest.test.tssuite: 24 pass, 0 fail (bun 1.3.14, macOS).The issue's optional suggestion (recovering attribution from the encoded transcript path) is left as a follow-up — this PR only fixes the dead guard.
Fixes #2353
🤖 Generated with Claude Code