fix(brain-allowlist): sync project-root design and test-plan artifacts#1465
Open
genisis0x wants to merge 1 commit into
Open
fix(brain-allowlist): sync project-root design and test-plan artifacts#1465genisis0x wants to merge 1 commit into
genisis0x wants to merge 1 commit into
Conversation
Fixes garrytan#1452. `/office-hours` Builder, `/plan-eng-review`, and `/autoplan` write their output at the project root, not under `designs/`: projects/{slug}/{user}-{branch}-design-{datetime}.md projects/{slug}/{user}-{branch}-test-plan-{datetime}.md projects/{slug}/{user}-{branch}-eng-review-test-plan-{datetime}.md The `.brain-allowlist` generated by `gstack-artifacts-init` covers `projects/*/designs/*.md` and the `ceo-plans/` paths, so CEO plans sync correctly but the design / test-plan artifacts they reference do not. Pull on machine B and you get the CEO plan but not the underlying design, breaking the cross-machine plan-references-design chain. Add three root-anchored globs to the managed block of `.brain-allowlist`: projects/*/*-design-*.md projects/*/*-test-plan-*.md projects/*/*-eng-review-test-plan-*.md The `*` glob doesn't match path separators, so these patterns are disjoint from the existing `designs/*.md` patterns — no double-sync, no churn for installs that already had the subdirectory layout. Mirror the three patterns in `.brain-privacy-map.json` with `"class": "artifact"`, matching how the existing `designs/*.md` patterns are classified there, so the same privacy semantics apply. Same class of incomplete-rename bug as garrytan#1441 (v1.27.0.0 missed the config key in one place); this audit covers the allowlist surface.
50b1d00 to
e1a9141
Compare
5 tasks
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.
Summary
Fixes #1452.
`/office-hours` Builder, `/plan-eng-review`, and `/autoplan` write their output at the project root, not under `designs/`:
```
projects/{slug}/{user}-{branch}-design-{datetime}.md
projects/{slug}/{user}-{branch}-test-plan-{datetime}.md
projects/{slug}/{user}-{branch}-eng-review-test-plan-{datetime}.md
```
The `.brain-allowlist` generated by `gstack-artifacts-init` covers `projects//designs/.md` and the `ceo-plans/` paths, so CEO plans sync correctly but the design / test-plan artifacts they reference do not. Pull on machine B and you get the CEO plan but not the underlying design, breaking the cross-machine plan-references-design chain.
Same class of incomplete-rename bug as #1441 (v1.27.0.0 missed the config key in one place); this audit covers the allowlist surface.
Changes
`bin/gstack-artifacts-init` — managed block of `.brain-allowlist` adds:
```
projects//-design-.md
projects//-test-plan-.md
projects//-eng-review-test-plan-*.md
```
`.brain-privacy-map.json` adds matching `"class": "artifact"` entries so the same privacy semantics that govern `designs/*.md` govern the project-root variants.
Why these patterns are safe to add to the managed block
The `` glob doesn't match path separators, so the new patterns are disjoint from the existing `designs/.md` patterns. No double-sync. No churn for installs that already have the subdirectory layout.
Why allowlist patch, not write-path change
The issue's "alternative (more conservative)" suggests canonicalizing the write paths in `/office-hours` and `/plan-eng-review` to use the `designs/` subdirectory. I picked the allowlist patch because:
Happy to follow up with the write-path canonicalization as a separate change if maintainers prefer that direction; that one needs an audit of the cross-skill readers and is a larger surface than this PR should bundle.
Testing
`bash -n bin/gstack-artifacts-init` clean. JSON snippet round-trips through `json.loads` (14 entries). `bun test` not run locally because bun isn't installed on this machine; the change is text/glob only with no behavior change to existing paths, so the existing `test/gstack-artifacts-init.test.ts` coverage should remain green.
Fixes #1452
Need help on this PR? Tag
@codesmithwith what you need.