Plan reviews no longer read a /design-review audit summary as the design doc (#4615) (#4623)

After a /design-review run, /autoplan, /plan-ceo-review and
/plan-eng-review now read the branch's real design doc instead of the
one-line audit summary that /design-review saves next to it.

Plan reviews are only useful when they review the actual design, so
picking up a pointer file silently gave them nothing to work with.

Nothing to do.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
Garry Tanandcapy-ai[bot] authored and GitHub committed 2026-11-21 17:02:59 +00:00
1 parent 515244505a
commit a1e2c7eeaa
3 files changed
+23 -1

No files matched your search

+5 -1
View File
@@ -9,6 +9,9 @@
# Precedence:
# 1. newest $GSTACK_STATE_ROOT/projects/<slug>/*-<branch>-design-*.md
# 2. else newest $GSTACK_STATE_ROOT/projects/<slug>/*-design-*.md
# Neither step returns an office-hours decision memo (*-memo-*) or a
# /design-review audit summary (*-design-audit-*), unless "design-" follows
# that word because the branch name holds it (#4615).
# 3. the newest repo doc under $TOP/docs/designs/ wins when no state-root doc
# exists or it is newer than the state-root doc. A root DESIGN.md is the
# design system /design-consultation writes, never a design doc (#2839).
@@ -39,7 +42,8 @@ newest() {
newest_design() {
ls -t "$@" 2>/dev/null | while IFS= read -r f; do
b=${f##*/}
case "${b##*-memo-}" in "$b"|*design-*) printf '%s\n' "$f"; break ;; esac
case "${b##*-memo-}" in "$b"|*design-*) ;; *) continue ;; esac
case "${b##*-design-audit-}" in "$b"|*design-*) printf '%s\n' "$f"; break ;; esac
done
}
@@ -0,0 +1 @@
**Plan reviews no longer read a /design-review audit summary as the branch's design doc.** After a design review, `/autoplan`, `/plan-ceo-review` and `/plan-eng-review` could pick up the one-line `…-design-audit-…md` pointer, because `gstack-design-doc-find` matched it as a design doc. The finder now skips audit summaries the way it already skips decision memos, and still finds the real design doc, including on a branch whose name contains "design-audit". Reported by @robbiesierra in #4615.
+17
View File
@@ -136,4 +136,21 @@ describe('rendered Design Doc Check block', () => {
const repo = f.write(path.join(f.repo, 'docs/designs/add-memo-export.md'), 5);
expect(f.find({}, ['proj', 'feat-memo'])).toBe(repo);
});
test('a /design-review audit summary is never returned as the design doc (#4615)', () => {
const f = fixture();
f.write(path.join(f.home, '.gstack/projects/proj/user-feat-x-design-audit-20261121-100000.md'), 10);
expect(f.find()).toBe('');
expect(f.find({}, ['proj', 'other'])).toBe('');
const doc = f.write(path.join(f.home, '.gstack/projects/proj/user-feat-x-design-20261101-100000.md'), 1000);
expect(f.find()).toBe(doc);
expect(f.find({}, ['proj', 'other'])).toBe(doc);
});
test('a branch named after a design audit still finds its design doc, not its audit summary (#4615)', () => {
const f = fixture();
const args = ['proj', 'fix-design-audit'];
f.write(path.join(f.home, '.gstack/projects/proj/user-fix-design-audit-design-audit-20261121-100000.md'), 10);
expect(f.find({}, args)).toBe('');
const doc = f.write(path.join(f.home, '.gstack/projects/proj/user-fix-design-audit-design-20261101-100000.md'), 1000);
expect(f.find({}, args)).toBe(doc);
});
});