rungate 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/gates/.gate-salt +1 -0
- package/gates/SCHEMA-GUIDE.md +485 -0
- package/gates/ac-quality.test.ts +106 -0
- package/gates/adversarial.test.ts +283 -0
- package/gates/brief-assembler.test.ts +487 -0
- package/gates/brief-assembler.ts +448 -0
- package/gates/bunfig.toml +2 -0
- package/gates/chain.test.ts +91 -0
- package/gates/e2e-smoke.test.ts +234 -0
- package/gates/error-classifier.test.ts +250 -0
- package/gates/error-classifier.ts +99 -0
- package/gates/gate-executor.ts +3071 -0
- package/gates/orchestrator.test.ts +968 -0
- package/gates/orchestrator.ts +827 -0
- package/gates/preload.ts +89 -0
- package/gates/prompts/ac-adversary.md +20 -0
- package/gates/prompts/evidence-validator.md +22 -0
- package/gates/prompts/prove-reproducer.md +53 -0
- package/gates/prompts.sha256 +3 -0
- package/gates/prove.test.ts +164 -0
- package/gates/rook-state.test.ts +108 -0
- package/gates/run-attribution.ts +290 -0
- package/gates/run-gate.ts +163 -0
- package/gates/schema-parity.test.ts +378 -0
- package/gates/schema.ts +1209 -0
- package/gates/self-heal.test.ts +511 -0
- package/gates/self-heal.ts +125 -0
- package/gates/ship-orchestrator.test.ts +399 -0
- package/gates/ship-orchestrator.ts +384 -0
- package/gates/spec-compliance-probe.ts +159 -0
- package/gates/test-fixtures/broken-no-environments.json +110 -0
- package/gates/test-fixtures/consumer-directory-layout.json +90 -0
- package/gates/test-fixtures/valid-standard.json +91 -0
- package/gates/test-utils.ts +43 -0
- package/gates/typecheck-gate.ts +111 -0
- package/gates/witness.ts +349 -0
- package/gates/workflow.test.ts +2018 -0
- package/hooks/BashWriteGuard.hook.ts +19 -0
- package/hooks/GateResultProtection.hook.ts +27 -1
- package/hooks/VerifyPhaseLock.hook.ts +51 -11
- package/hooks/WorkflowStateGuard.hook.ts +24 -0
- package/lib/ai-review-rounds.ts +462 -0
- package/lib/bash-file-read.ts +17 -3
- package/lib/bash-write-guard.ts +1285 -50
- package/lib/distribution-standing.ts +75 -4
- package/lib/failure-intake.ts +12 -4
- package/lib/file-extensions.ts +81 -0
- package/lib/finding-arbiter.ts +1015 -0
- package/lib/finding-jury.ts +537 -0
- package/lib/gate-enforcement.ts +171 -43
- package/lib/gate-result-protection.ts +12 -2
- package/lib/generators/code-map.ts +55 -4
- package/lib/generators/types.ts +27 -1
- package/lib/github.ts +55 -0
- package/lib/interpreters.ts +64 -0
- package/lib/issue-create-override.ts +69 -8
- package/lib/issue-filing-gate.ts +605 -0
- package/lib/js-top-level-code.ts +20 -2
- package/lib/junit-checks.ts +239 -1
- package/lib/package-closure.ts +114 -0
- package/lib/publish-window.ts +287 -0
- package/lib/scaffold/ai-review-findings.ts +142 -3
- package/lib/scaffold/ai-review-step.ts +1012 -18
- package/lib/scaffold/managed-workflow.ts +163 -4
- package/lib/scaffold/steps.ts +498 -22
- package/lib/scanner.ts +13 -4
- package/lib/ticked-sc-symbols.ts +361 -0
- package/lib/transcript-checker.ts +6 -0
- package/lib/workflow-actions.ts +18 -0
- package/package.json +3 -1
- package/scripts/arbitrate-finding.ts +224 -0
- package/scripts/generate-code-map.ts +18 -10
- package/scripts/sync-sc-status.ts +82 -8
package/lib/bash-file-read.ts
CHANGED
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
/** Commands that read files when given an operand. */
|
|
22
|
+
import { isInterpreterWord } from './interpreters';
|
|
23
|
+
|
|
22
24
|
const FILE_READERS = new Set(['cat', 'head', 'tail']);
|
|
23
25
|
|
|
24
26
|
/** Flags that consume the following token as their value (`head -n 20 f`). */
|
|
@@ -131,8 +133,20 @@ function splitSegments(command: string): string[] {
|
|
|
131
133
|
return segments;
|
|
132
134
|
}
|
|
133
135
|
|
|
134
|
-
/**
|
|
135
|
-
|
|
136
|
+
/**
|
|
137
|
+
* Does the text before a `<<` end in an interpreter, which will EXECUTE the
|
|
138
|
+
* body rather than read it as a document?
|
|
139
|
+
*
|
|
140
|
+
* #1240: this used to be a local regex matching shells only, so a
|
|
141
|
+
* `python3 <<'PY'` body read as a document here while the write guard could
|
|
142
|
+
* not see it at all. The name list now comes from `lib/interpreters.ts`,
|
|
143
|
+
* which is the one binding both modules read — the write guard's list was
|
|
144
|
+
* the wider and more correct of the two.
|
|
145
|
+
*/
|
|
146
|
+
function feedsInterpreter(prefix: string): boolean {
|
|
147
|
+
const last = prefix.trim().split(/[\s;&|]+/).pop() ?? '';
|
|
148
|
+
return isInterpreterWord(last);
|
|
149
|
+
}
|
|
136
150
|
|
|
137
151
|
/**
|
|
138
152
|
* Remove heredoc bodies before scanning.
|
|
@@ -159,7 +173,7 @@ function stripHeredocBodies(command: string): string {
|
|
|
159
173
|
}
|
|
160
174
|
|
|
161
175
|
const m = line.match(/<<(-?)\s*(['"]?)([A-Za-z_][A-Za-z0-9_]*)\2/);
|
|
162
|
-
if (m && !
|
|
176
|
+
if (m && !feedsInterpreter(line.slice(0, m.index))) {
|
|
163
177
|
allowIndent = m[1] === '-';
|
|
164
178
|
delim = m[3];
|
|
165
179
|
out.push(line.slice(0, m.index) + line.slice(m.index! + m[0].length));
|