Compose the complete example from native step fragments
This commit is contained in:
@@ -364,6 +364,12 @@ Prompt size: discovery and cross-boundary behavioral verification.
|
||||
|
||||
## Stage 8 — Maintain Runnable Native Composition Examples
|
||||
|
||||
**Complete.** The complete example imports its first step as a required native
|
||||
sequence item; existing order, handoff, and inheritance assertions pass. The
|
||||
CLI and module-integration suites and credential-free minimal, complete, and
|
||||
development validation pass. An old missing-source diagnostic assertion was
|
||||
also updated to match the delegated loader.
|
||||
|
||||
Goal: demonstrate the approved features in the existing two top-level examples.
|
||||
|
||||
Inspect examples/dnd-complete.config.yml, pipelines/dnd-session.yml, development
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
version: 5
|
||||
configkit:
|
||||
config:
|
||||
imports:
|
||||
- path: pipelines/dnd-session.yml
|
||||
required: true
|
||||
promptkit:
|
||||
profile_file: ./llm-profiles/dnd-extraction.yml
|
||||
transient_retries: 2
|
||||
|
||||
37
examples/pipelines/dnd-session.describe-session.yml
Normal file
37
examples/pipelines/dnd-session.describe-session.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
# Establish session-wide reference artifacts before their consumers.
|
||||
id: describe-session
|
||||
artifacts:
|
||||
item-registry:
|
||||
extract:
|
||||
module: dnd/item-registry
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/item-registry
|
||||
npc-registry:
|
||||
extract:
|
||||
module: dnd/npc-registry
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/npc-registry
|
||||
retries: 2
|
||||
location-registry:
|
||||
extract:
|
||||
module: dnd/location-registry
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/location-registry
|
||||
retries: 2
|
||||
scene-descriptions:
|
||||
extract:
|
||||
module: dnd/scene-descriptions
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/scene-descriptions
|
||||
@@ -1,3 +1,9 @@
|
||||
config:
|
||||
imports:
|
||||
- path: dnd-session.describe-session.yml
|
||||
required: true
|
||||
destination: [pipelines, dnd-session, steps]
|
||||
placement: sequence-item
|
||||
pipelines:
|
||||
dnd-session:
|
||||
llm_profile: dnd-extraction
|
||||
@@ -30,43 +36,6 @@ pipelines:
|
||||
- npc-occurrences
|
||||
- enemy-events
|
||||
steps:
|
||||
# Establish session-wide reference artifacts before their consumers.
|
||||
- id: describe-session
|
||||
artifacts:
|
||||
item-registry:
|
||||
extract:
|
||||
module: dnd/item-registry
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/item-registry
|
||||
npc-registry:
|
||||
extract:
|
||||
module: dnd/npc-registry
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/npc-registry
|
||||
retries: 2
|
||||
location-registry:
|
||||
extract:
|
||||
module: dnd/location-registry
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/location-registry
|
||||
retries: 2
|
||||
scene-descriptions:
|
||||
extract:
|
||||
module: dnd/scene-descriptions
|
||||
retries: 2
|
||||
merge:
|
||||
module: appendorder
|
||||
normalize:
|
||||
module: dnd/scene-descriptions
|
||||
- id: extract-events
|
||||
# Accepted registry artifacts and scene-description eligibility artifacts
|
||||
# are supplied in memory to their compatible consumers in this step.
|
||||
|
||||
@@ -286,6 +286,13 @@ func completeExampleConfigWithTemporaryCache(t *testing.T) string {
|
||||
if err := os.WriteFile(filepath.Join(root, "pipelines", "dnd-session.yml"), fragment, 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
description, err := os.ReadFile(repositoryPath("examples", "pipelines", "dnd-session.describe-session.yml"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := os.WriteFile(filepath.Join(root, "pipelines", "dnd-session.describe-session.yml"), description, 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
path := filepath.Join(root, "dnd-complete.config.yml")
|
||||
if err := os.WriteFile(path, []byte(updated), 0o600); err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
@@ -154,7 +154,7 @@ func TestRunRetainsDebugBundlesAcrossFailures(t *testing.T) {
|
||||
root := filepath.Join(t.TempDir(), "debug")
|
||||
var stdout, stderr bytes.Buffer
|
||||
code := RunWithOptions([]string{"run", "sample", "--config", filepath.Join(t.TempDir(), "missing.yml"), "--input", "missing", "--debug", "--debug-dir", root}, &stdout, &stderr, newStateTestHarness().options())
|
||||
if code != 1 || !strings.Contains(stderr.String(), "config file") {
|
||||
if code != 1 || !strings.Contains(stderr.String(), "source.missing") {
|
||||
t.Fatalf("code=%d stderr=%q", code, stderr.String())
|
||||
}
|
||||
assertAbsent(t, root)
|
||||
|
||||
Reference in New Issue
Block a user