Description
A minimal, self-contained intent (one small change) runs successfully through all 12 once-per-workflow methodology stages, but then aborts at unit-DAG promotion:
units_promotion_failed: units-generation: artifact_not_found
The units-generation stage exits 0 (success) yet writes no unit-of-work-dependency artifact to the graph. Promotion then hard-fails the whole execution because it finds nothing to promote.
Expected: a trivial intent should degenerate to a single implicit unit (the whole intent = one unit) and continue to construction — or the stage should be guaranteed to always emit at least a one-unit DAG. A stage that exits 0 without producing its declared output artifact should not silently pass and then abort the run one step later.
Root cause — two gaps combine:
-
The stage can "succeed" without producing its required artifact. On a trivial intent the model sees nothing to fan out and skips emitting the fenced-YAML units: DAG. The blocking required-sections sensor does not catch this: it validates the content of an existing artifact, so with no artifact at all there is nothing to fail on. There is no "did this stage produce its declared output artifact?" check (lambda/shared/v2-sensor-contract.js).
-
Promotion hard-fails instead of degenerating. lambda/agentcore/commands/promote-units.js:
const artifact = pickCurrentArtifact(rows);
if (!artifact) {
await event('v2.units.promotion_failed', no current ${DAG_ARTIFACT_TYPE} artifact);
return { ok: false, reason: 'artifact_not_found' }; // aborts the execution
}
Note a distinct dag_absent reason already exists for "artifact exists but has no units: block"; the trivial-intent path instead hits artifact_not_found (no artifact row at all).
Suggested fix (pick one or combine):
A. (preferred) Degenerate gracefully: when no DAG artifact exists (or it parses to zero units), synthesise a one-unit plan (whole intent = one unit, no deps) and continue.
B. Guarantee the stage always emits >=1 unit, and add a stage-completion sensor that fails the stage if its declared output artifact is missing — so it's caught at the stage, not one step later.
C. At minimum, surface an actionable message ("intent produced no unit plan — may be too small to fan out; proceed as a single unit?") instead of a bare failure reason.
Steps to reproduce
- Create a v2 project (AgentCore) on any git provider.
- Create a new intent with a trivial, single-file scope, e.g.:
"Add a new read-only REST endpoint GET /api/health/details returning app name, UTC ISO-8601 time, and status "UP". One controller method + one unit test. No new dependencies, no DB, no changes to existing endpoints."
- Continue to Compose and run the intent.
- Observe: all stages report exitCode=0 (feasibility ... application-design ... units-generation), then the run fails with units_promotion_failed: units-generation: artifact_not_found.
Logs or screenshots
No response
Environment
No response
Description
A minimal, self-contained intent (one small change) runs successfully through all 12 once-per-workflow methodology stages, but then aborts at unit-DAG promotion:
The
units-generationstage exits 0 (success) yet writes nounit-of-work-dependencyartifact to the graph. Promotion then hard-fails the whole execution because it finds nothing to promote.Expected: a trivial intent should degenerate to a single implicit unit (the whole intent = one unit) and continue to construction — or the stage should be guaranteed to always emit at least a one-unit DAG. A stage that exits 0 without producing its declared output artifact should not silently pass and then abort the run one step later.
Root cause — two gaps combine:
The stage can "succeed" without producing its required artifact. On a trivial intent the model sees nothing to fan out and skips emitting the fenced-YAML
units:DAG. The blockingrequired-sectionssensor does not catch this: it validates the content of an existing artifact, so with no artifact at all there is nothing to fail on. There is no "did this stage produce its declared output artifact?" check (lambda/shared/v2-sensor-contract.js).Promotion hard-fails instead of degenerating. lambda/agentcore/commands/promote-units.js:
const artifact = pickCurrentArtifact(rows);
if (!artifact) {
await event('v2.units.promotion_failed',
no current ${DAG_ARTIFACT_TYPE} artifact);return { ok: false, reason: 'artifact_not_found' }; // aborts the execution
}
Note a distinct
dag_absentreason already exists for "artifact exists but has no units: block"; the trivial-intent path instead hitsartifact_not_found(no artifact row at all).Suggested fix (pick one or combine):
A. (preferred) Degenerate gracefully: when no DAG artifact exists (or it parses to zero units), synthesise a one-unit plan (whole intent = one unit, no deps) and continue.
B. Guarantee the stage always emits >=1 unit, and add a stage-completion sensor that fails the stage if its declared output artifact is missing — so it's caught at the stage, not one step later.
C. At minimum, surface an actionable message ("intent produced no unit plan — may be too small to fan out; proceed as a single unit?") instead of a bare failure reason.
Steps to reproduce
"Add a new read-only REST endpoint GET /api/health/details returning app name, UTC ISO-8601 time, and status "UP". One controller method + one unit test. No new dependencies, no DB, no changes to existing endpoints."
Logs or screenshots
No response
Environment
No response