v1.91.143.0 fix(evals): shared read-only command grammar for fixtures; docsync opts in (GSTA-49) (#3288)

* fix(evals): shared read-only command grammar for fixtures; docsync opts in (GSTA-49)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test(evals): read-only grammar controls are POSIX-only; pin fail-closed on Windows (GSTA-49)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test(evals): docsync grammar corpus forms run on POSIX only; Windows fails closed (GSTA-49)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(evals): echo/printf join the read-only grammar; docsync literal reads stay inside the fixture home (GSTA-49)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(evals): docsync keeps Git reads out of grammar lines; sed -n paging, composed-cat completed reads, config dir listable (GSTA-49)

Fable 5.1 (CI's eval model) read the grammar's 'Join them with ;, && or ||' as
covering Git reads: PR E2E 39186278010 failed 5 docsync cases on 21 joined
commands. The interface now says joins cover only the grammar's own reads and
Git, Preamble, lifecycle and candidate commands each run as their own Bash call.

- read-only grammar: sed -n with a line-range print script (file or pipe)
- docsync: a trailing ; on a declared read is a harmless wrapper; the completed-
  read check credits a cat inside an accepted grammar line (not piped, no cd);
  the Claude config dir is listable and settings.json readable while
  .claude.json and every other config file stay denied
- focused Fable reruns: ship-docsync-missing-asset and ship-docsync-failure pass

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* chore: stamp v1.91.143.0 (GSTA-49 shared read-only grammar)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

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-10-19 03:26:31 +00:00
1 parent 8640ab4ff4
commit 2d42e4ece8
10 files changed
+804 -26

No files matched your search

+4 -1
View File
@@ -121,12 +121,15 @@ test('Git guidance uses the existing working directory; --git-dir and --work-tre
describe('stored docsync observer commands', () => {
const stored = JSON.parse(fs.readFileSync(path.join(import.meta.dir, 'fixtures/docsync-observer-commands.json'), 'utf8')) as
{ known_good: string[]; known_bad: string[] };
{ known_good: string[]; known_good_posix: string[]; known_bad: string[] };
const fill = (command: string) => command.replaceAll('{repo}', fixture.repo).replaceAll('{other}', path.dirname(fixture.repo))
.replaceAll('{home}', fixture.home);
test.each(stored.known_good)('harmless read form is accepted: %s', command => {
expect(docsCommandAllowed(fill(command), fixture)).toBe(true);
});
test.skipIf(process.platform === 'win32').each(stored.known_good_posix)('shared read-only grammar form is accepted: %s', command => {
expect(docsCommandAllowed(fill(command), fixture)).toBe(true);
});
test.each(stored.known_bad)('known-bad form stays rejected: %s', command => {
expect(docsCommandAllowed(fill(command), fixture)).toBe(false);
});