Reconcile reuse and inspection with native extraction
This commit is contained in:
@@ -73,10 +73,6 @@ notarius:
|
||||
outputs:
|
||||
npc_registry:
|
||||
lane_id: npc-registry
|
||||
media_type: application/json
|
||||
schema_id: notarius.dnd.npc_registry
|
||||
schema_version: v1
|
||||
module_key: dnd/npc-registry
|
||||
notification:
|
||||
mode: noop
|
||||
`)
|
||||
@@ -85,7 +81,6 @@ campaign: sample-campaign
|
||||
inputs:
|
||||
audio_dir: ./audio
|
||||
speakers_file: ./speakers.yml
|
||||
autocorrect_file: ./autocorrect.yml
|
||||
glossary_file: ./glossary.yml
|
||||
`)
|
||||
|
||||
@@ -154,7 +149,7 @@ inputs:
|
||||
}
|
||||
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() {
|
||||
if walkErr != nil || entry.IsDir() || entry.Type()&os.ModeSymlink != 0 {
|
||||
return walkErr
|
||||
}
|
||||
data, err := os.ReadFile(path)
|
||||
@@ -233,6 +228,14 @@ func TestProviderCredentialProcessFixture(t *testing.T) {
|
||||
_, _ = os.Stderr.WriteString(sharedProviderKey + "\n")
|
||||
os.Exit(0)
|
||||
}
|
||||
if args[0] == "pipeline" {
|
||||
_, _ = os.Stdout.WriteString(`{"pipeline":"dnd-session","input":{"module":"synthetic","execution_class":"deterministic"},"chunk":{"module":"synthetic","execution_class":"deterministic"},"output":{"module":"synthetic","execution_class":"deterministic"},"steps":[{"id":"step","lanes":[{"id":"npc-registry","artifact_kind":"synthetic","extract":{"module":"synthetic","execution_class":"deterministic"},"merge":{"module":"synthetic","execution_class":"deterministic"},"normalize":{"module":"synthetic","execution_class":"deterministic"}}]}]}`)
|
||||
os.Exit(0)
|
||||
}
|
||||
if args[0] == "preflight" && appSeriatimFlagValue(args, "--input-file") != "" {
|
||||
_, _ = os.Stdout.WriteString(`{"pipeline":"dnd-session","ready":true,"checks":[]}`)
|
||||
os.Exit(0)
|
||||
}
|
||||
switch args[0] {
|
||||
case "process", "preflight":
|
||||
if os.Getenv(auditaOnlyName) != auditaOnlyKey {
|
||||
@@ -271,18 +274,11 @@ func TestProviderCredentialProcessFixture(t *testing.T) {
|
||||
if err := os.MkdirAll(filepath.Join(bundle, "lanes"), 0o755); err != nil {
|
||||
os.Exit(2)
|
||||
}
|
||||
for name, value := range map[string]string{
|
||||
"manifest.json": "{}", "rejected.json": `{"rejected":[]}`,
|
||||
"warnings.json": `{"schema_version":"notarius.warnings.v2","group_count":0,"occurrence_count":0,"groups":[]}`,
|
||||
"diagnostics.json": `{"schema_version":"notarius.diagnostics.v1","group_count":0,"occurrence_count":0,"truncated":false,"unrepresented_occurrence_count":0,"groups":[]}`,
|
||||
"lanes/npc.json": `{"records":[]}`,
|
||||
"index.json": `{"manifest_file":"manifest.json","output_files":[{"lane_id":"npc-registry","file":"lanes/npc.json","media_type":"application/json","module_key":"dnd/npc-registry","schema_id":"notarius.dnd.npc_registry","schema_version":"v1"}],"rejected_file":"rejected.json","warnings_file":"warnings.json","diagnostics_file":"diagnostics.json"}`,
|
||||
} {
|
||||
if err := os.WriteFile(filepath.Join(bundle, filepath.FromSlash(name)), []byte(value), 0o644); err != nil {
|
||||
os.Exit(2)
|
||||
}
|
||||
if err := os.WriteFile(filepath.Join(bundle, "lanes", "npc-registry.json"), []byte(`{"records":[]}`), 0o644); err != nil {
|
||||
os.Exit(2)
|
||||
}
|
||||
_, _ = os.Stdout.WriteString(fmt.Sprintf(`{"schema_version":"notarius.run-result.v2","run_id":"fixture-run","pipeline_id":"dnd-session","output_directory":%q,"index_file":"index.json","normalized_output_count":1,"rejected_output_count":0,"warning_group_count":0,"warning_occurrence_count":0,"diagnostic_group_count":0,"diagnostic_occurrence_count":0,"diagnostics_truncated":false,"validation_status":"approved"}`, bundle))
|
||||
_, _ = fmt.Fprintf(os.Stdout, `{"pipeline":"dnd-session","artifact_count":1,"output_directory":%q}`, bundle)
|
||||
|
||||
default:
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user