Forward Scriptorium credentials through the shared adapter path
This commit is contained in:
@@ -52,6 +52,18 @@ seriatim:
|
||||
audita:
|
||||
binary: `+fixture+`
|
||||
credentials: [`+sharedProviderName+`, `+auditaOnlyName+`]
|
||||
scriptorium:
|
||||
binary: `+fixture+`
|
||||
credentials: [`+sharedProviderName+`]
|
||||
render_debug: true
|
||||
artifacts:
|
||||
recap:
|
||||
enabled: true
|
||||
prompt_id: recap
|
||||
output_path: artifacts/recap.md
|
||||
inputs:
|
||||
transcript:
|
||||
source: narratio.transcript.final_trimmed
|
||||
notarius:
|
||||
enabled: true
|
||||
binary: `+fixture+`
|
||||
@@ -132,6 +144,12 @@ inputs:
|
||||
t.Fatalf("extract did not execute: %q", stdout.String())
|
||||
}
|
||||
redactedLogs := 0
|
||||
stdout.Reset()
|
||||
stderr.Reset()
|
||||
if code := Execute(append([]string{"analyze", "2026-05-03"}, args...), &stdout, &stderr); code != 0 {
|
||||
t.Fatalf("analyze exit = %d; stderr=%q", code, stderr.String())
|
||||
}
|
||||
assertNoProviderValues(t, stdout.Bytes(), stderr.Bytes())
|
||||
if err := filepath.WalkDir(workRoot, func(path string, entry os.DirEntry, walkErr error) error {
|
||||
if walkErr != nil || entry.IsDir() {
|
||||
return walkErr
|
||||
@@ -147,8 +165,8 @@ inputs:
|
||||
}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if redactedLogs < 2 {
|
||||
t.Fatalf("redacted subprocess logs = %d, want Audita and Notarius", redactedLogs)
|
||||
if redactedLogs < 4 {
|
||||
t.Fatalf("redacted subprocess logs = %d, want Audita, Notarius and Scriptorium run/render", redactedLogs)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,6 +211,24 @@ func TestProviderCredentialProcessFixture(t *testing.T) {
|
||||
_, _ = os.Stderr.WriteString("shared credential not forwarded\n")
|
||||
os.Exit(2)
|
||||
}
|
||||
if appSeriatimFlagValue(args, "--prompt") != "" {
|
||||
if _, present := os.LookupEnv(auditaOnlyName); present {
|
||||
os.Exit(2)
|
||||
}
|
||||
if appSeriatimFlagValue(args, "--api-key-env") != "" {
|
||||
os.Exit(2)
|
||||
}
|
||||
output := appSeriatimFlagValue(args, "--out")
|
||||
if err := os.MkdirAll(filepath.Dir(output), 0o755); err != nil {
|
||||
os.Exit(2)
|
||||
}
|
||||
if err := os.WriteFile(output, []byte("{}\n"), 0o644); err != nil {
|
||||
os.Exit(2)
|
||||
}
|
||||
_, _ = os.Stdout.WriteString(sharedProviderKey + "\n")
|
||||
_, _ = os.Stderr.WriteString(sharedProviderKey + "\n")
|
||||
os.Exit(0)
|
||||
}
|
||||
switch args[0] {
|
||||
case "process":
|
||||
if os.Getenv(auditaOnlyName) != auditaOnlyKey {
|
||||
|
||||
Reference in New Issue
Block a user