fix: prove generated outputs in a second regen run; literal names only

The regen verdict comes from the unmodified run again, so a generator that
reads its own registered output (gen-skill-docs and
qa/templates/functional-report-template.md) passes as before; the proof is a
second run with the touched outputs deleted, and its failure only means not
proven. The carry ignores a proven path with glob syntax, since it uses the
paths as pathspec globs (pre-landing review, #3564 pass 2).

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-10-28 23:54:37 +00:00
1 parent f47aba6fe7
commit bf9a417d54
10 files changed
+59 -29

No files matched your search

+3 -2
View File
@@ -389,7 +389,8 @@ function pregateFieldFor(repoRoot: string, file: string, head: string): { ok: tr
* passed for HEAD proved (its regen check deleted each touched output and the
* entry's command recreated it byte-identically), when that check ran
* origin/<base>'s `.gstack/generated.json` at the commit this carry reads and the
* path is an output of an entry with a `command` there. Anything else is product.
* path is an output of an entry with a `command` there. A proven name with glob
* syntax is product too: the carry uses these paths as pathspec globs.
*/
function verifiedOutputs(repoRoot: string, base: string, pregateFile: string | undefined): string[] {
if (!pregateFile) return [];
@@ -398,7 +399,7 @@ function verifiedOutputs(repoRoot: string, base: string, pregateFile: string | u
const load = loadRegistryFromBase(repoRoot, base);
if (isRegistryUnavailable(load) || load.errors.length || regen.inputs?.registry !== load.source.label) return [];
const owned = load.registry.entries.filter(e => e.command).flatMap(e => e.outputs);
return regen.proven.filter(p => matchesAny(owned, p));
return regen.proven.filter(p => !/[*?[\]\\]/.test(p) && matchesAny(owned, p));
}
interface ProductRules { extra: { metadata: string[]; outputs: readonly string[] }; metadata: string[]; templates: readonly string[] }