v0 Wave A: constructs + Definition Graph - #38
Conversation
🤖 CodeAnt AI — Review Status
|
|
Running ultrareview automatically — This PR rebuilds core around a new Definition Graph and introduces a foundational constructs package — a cross-cutting refactor where subtle synthesis, validation, or graph-construction bugs could break every downstream pipeline.. I'll post findings when complete. |
|
I can't run this ultrareview because you've reached your trial's review limit. Trial plans have lower review limits than paid plans. Upgrade now to resume reviews. To help optimise your usage, you can tune cubic to get the most out of your usage limits:
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis change adds ChangesWave A foundation
Estimated code review effort: 4 (Complex) | ~60 minutes Mergeability Score: 🟠 High · up to This PR introduces construct-based authoring and graph synthesis, but the current head can still omit authored steps or generate dangling and invalid dependencies, and the configured quality gate is failing. Those issues can produce incomplete or invalid pipeline definitions, so the PR is not ready to merge until the correctness findings and quality-gate failures are fixed. Sequence Diagram(s)sequenceDiagram
participant Project
participant synthesize
participant validate
participant DefinitionGraph
Project->>synthesize: Provide construct tree
synthesize->>DefinitionGraph: Build operations and dependencies
synthesize->>validate: Validate references and cycles
validate-->>synthesize: Return validation result
synthesize-->>Project: Return DefinitionGraph
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
MergerNeeds Review PR exceeds the merge-gate context budget (70088 tokens); escalating to a human reviewer. Commit |
There was a problem hiding this comment.
This PR introduces a solid foundation for the v0 Wave A constructs and definition graph implementation. The code is well-structured with comprehensive test coverage (48 tests passing). However, I've identified 2 critical issues that must be fixed before merge:
- Dead code in validate.ts - Lines 78-84 contain an unused loop and Set that serves no purpose
- Incorrect fallback logic in synthesize.ts - Using empty string as fallback for missing artifact paths will create invalid exports that bypass earlier validation
Both issues have specific fixes provided. Once these are addressed, the PR will be ready to merge.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 107 |
| Duplication | 2 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
PR Summary by QodoWave A: introduce @sverka/constructs and Definition Graph synthesis
AI Description
Diagram
High-Level Assessment
Files changed (27)
|
There was a problem hiding this comment.
Pull Request Overview
The PR introduces a construct-based authoring model and synthesis layer, but currently fails to meet quality standards due to high complexity in core logic and logical gaps in collision detection. Specifically, the validateOutputCollisions logic misses importArtifact operations and contains dead code.
Several acceptance criteria are met, including dependency inference and cycle detection; however, the OUTPUT_COLLISION validation is effectively unreachable or incomplete. High-risk files include packages/core/src/validate.ts and packages/core/src/synthesize.ts due to high cyclomatic complexity and long methods that combine multiple responsibilities. These should be refactored to ensure maintainability.
About this PR
- The validation path for 'OUTPUT_COLLISION' is currently unreachable through standard Step authoring because construct IDs and Props use Map/Record structures that enforce uniqueness at the language level. Additionally,
PipelineDefinition.outputsaggregates Step outputs into a flat array without associated names, which may complicate mapping for providers.
Test suggestions
- Verify Project, Pipeline, and Step nesting constraints (INVALID_SCOPE)
- Detect duplicate construct IDs (DUPLICATE_ID)
- Validate artifact outputs require a 'path' (INVALID_OUTPUT)
- Infer artifact and value dependencies from StepRefs during synthesis
- Infer control dependencies from dependsOn
- Ensure specific dependencies (value/artifact) override control dependencies for the same producer
- Detect dependency cycles (CYCLE)
- Detect references to unknown producers (UNKNOWN_PRODUCER)
- Detect type mismatches in StepRefs vs producer output (INCOMPATIBLE_REFERENCE)
- Detect duplicate output names in a single step (OUTPUT_COLLISION)
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Detect duplicate output names in a single step (OUTPUT_COLLISION)
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
There was a problem hiding this comment.
Actionable comments posted: 17
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@engdocs/adr/ADR-010-construct-core-boundary.md`:
- Line 4: Align the active-document dates with the review date: update
2026-08-13 in engdocs/adr/ADR-010-construct-core-boundary.md at line 4, and
update 2026-08-13 or mark the plan as future-dated in
engdocs/architecture/v0-wave-A-plan.md at line 5.
In `@engdocs/architecture/v0-wave-A-plan.md`:
- Around line 9-12: Add language identifiers to every listed Markdown code
fence: engdocs/architecture/v0-wave-A-plan.md lines 9-12, 20-30, and 34-45, plus
specs/05-synthesis/spec.md lines 12-14. Use an appropriate identifier for each
dependency, constructs layout, core layout, and synthesis lifecycle block while
preserving their contents.
In `@packages/constructs/src/constructs.ts`:
- Line 4: Remove the unused Construct import from constructs.ts, leaving the
remaining imports and implementation unchanged.
In `@packages/core/src/__tests__/synthesize.test.ts`:
- Around line 65-89: Add a test case alongside the existing artifact StepRef
test that supplies the input step as "ci/build" instead of "build". Synthesize
the pipeline and assert the generated artifact dependency producer is exactly
"ci/build", covering the synthesizeStep handling of already-prefixed references.
In `@packages/core/src/__tests__/validate.test.ts`:
- Around line 43-64: Replace the current collision test in the validation test
suite with a direct `validateOutputCollisions` call using a hand-built
`StepDefinition` containing two export operations with the same name, and assert
it raises `SynthesisError(OUTPUT_COLLISION)`. Rename the existing `synthesize`
case to describe the no-collision path, retaining its successful synthesis
assertion; use the package’s concrete `Runtime` value.
- Around line 17-22: Update the cycle-error test around synthesize(proj) to
assert the thrown SynthesisError once using toThrow with expect.objectContaining
matching code "CYCLE". Remove the separate try/catch and duplicate synthesize
invocation while preserving validation of the error type and code.
In `@packages/core/src/graph.ts`:
- Around line 63-67: Update the exported Dependency type in graph.ts from a
single interface to a discriminated union keyed by kind: keep output absent for
control dependencies, and require output for value and artifact dependencies.
Preserve the readonly producer field across all variants and ensure
synthesizeStep remains compatible with the stricter type.
In `@packages/core/src/synthesize.ts`:
- Around line 40-44: Update synthesize and add or use collectPipelineChildren to
recursively traverse the construct tree, handling every Step subclass, Entry,
and Pipeline while descending into grouping constructs. Replace silent omission
of unsupported nodes with SynthesisError, preserving synthesis of valid nested
pipelines and steps.
- Line 104: Export the existing resolveStepId function from validate.ts and
reuse it in synthesize.ts for producerId, dependsOn references, and entry roots.
Replace unconditional pipeline-prefix concatenation so already-qualified
references such as “ci/build” remain unchanged while local step references still
resolve within the current pipeline.
- Around line 67-68: The synthesized output declarations currently discard
output names, forcing validation to reconstruct them from export operations. In
packages/core/src/synthesize.ts lines 67-68, preserve each output’s map key in
StepDefinition.outputs and qualify pipeline-level output names with the
producing step id; in packages/core/src/validate.ts lines 77-84, validate name
collisions directly from the named step.outputs and remove the operations-based
workaround.
- Around line 14-22: Remove the unused ProjectDefinition type from the import
list in synthesize.ts, leaving the other graph.js imports unchanged.
In `@packages/core/src/validate.ts`:
- Around line 77-84: Remove the empty nested loop over step.outputs, including
the unused seen Set and its speculative comments, while preserving the
surrounding validation logic in the steps iteration.
- Around line 106-149: Reduce cognitive complexity in validateReferenceTypes by
extracting output map construction into a buildOutputTypeMap helper and the
per-reference validation into checkStepRef(step, ref, producerOutputs). Keep
validateReferenceTypes focused on iterating steps and inputs, delegating each
step reference check while preserving existing SynthesisError behavior.
In `@specs/01-constructs/spec.md`:
- Around line 63-69: Update StepProps.outputs in the authoring model so
duplicate output names remain representable for validation, preferably by using
a named declaration array instead of a Record. Then ensure synthesis validation
can detect duplicates and preserve the OUTPUT_COLLISION requirement and
corresponding test; alternatively, consistently remove or redefine that rule and
test.
In `@specs/02-definition-graph/spec.md`:
- Around line 53-59: Resolve the mismatch between PipelineDefinition.outputs and
the authoring contract: update PipelineProps to expose pipeline outputs and
define how they are normalized into PipelineDefinition.outputs, or defer the
field by removing it from the required interface and test plan. Ensure the
synthesis contract and tests consistently reflect the chosen behavior.
- Around line 80-85: Update the exportOutput variant of OperationDefinition to
accept only scalar output types, excluding "artifact" from OutputType; leave
exportArtifact as the required representation for artifact outputs and preserve
the other operation variants unchanged.
In `@specs/05-synthesis/spec.md`:
- Around line 91-99: Specify the synthesis name-resolution rule for
StepRef.step, dependsOn, and Entry.roots: resolve each pipeline-local name to
its path-qualified Definition Graph ID using the containing pipeline path, such
as build in pipeline ci becoming ci/build. Update the dependency and entry-root
requirements to use these qualified IDs, and add tests covering both dependency
references and entry roots.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d81d58e2-d81e-41bd-8f49-e7ef6d5a336c
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (56)
engdocs/adr/ADR-010-construct-core-boundary.mdengdocs/architecture/v0-wave-A-plan.mdpackages/constructs/package.jsonpackages/constructs/project.jsonpackages/constructs/src/__tests__/constructs.test.tspackages/constructs/src/__tests__/model.test.tspackages/constructs/src/base.tspackages/constructs/src/constructs.tspackages/constructs/src/errors.tspackages/constructs/src/index.tspackages/constructs/src/model.tspackages/constructs/tsconfig.jsonpackages/constructs/tsdown.config.tspackages/core/package.jsonpackages/core/project.jsonpackages/core/src/__tests__/canonical.test.tspackages/core/src/__tests__/composables/parallel.test.tspackages/core/src/__tests__/composables/pipeline.test.tspackages/core/src/__tests__/composables/run.test.tspackages/core/src/__tests__/composables/when.test.tspackages/core/src/__tests__/composables/workflow.test.tspackages/core/src/__tests__/composition.test.tspackages/core/src/__tests__/conditions.test.tspackages/core/src/__tests__/dag.test.tspackages/core/src/__tests__/errors.test.tspackages/core/src/__tests__/graph.test.tspackages/core/src/__tests__/helpers/runtime.tspackages/core/src/__tests__/ids.test.tspackages/core/src/__tests__/laziness.test.tspackages/core/src/__tests__/matrix.test.tspackages/core/src/__tests__/public-api.test.tspackages/core/src/__tests__/runtime-modes.test.tspackages/core/src/__tests__/synthesize.test.tspackages/core/src/__tests__/validate.test.tspackages/core/src/composables/matrix.tspackages/core/src/composables/parallel.tspackages/core/src/composables/pipeline.tspackages/core/src/composables/run.tspackages/core/src/composables/when.tspackages/core/src/composables/workflow.tspackages/core/src/errors.tspackages/core/src/graph.tspackages/core/src/index.tspackages/core/src/internal/canonical.tspackages/core/src/internal/conditions.tspackages/core/src/internal/ids.tspackages/core/src/internal/merge.tspackages/core/src/internal/node.tspackages/core/src/internal/plan.tspackages/core/src/operation.tspackages/core/src/runtime.tspackages/core/src/synthesize.tspackages/core/src/validate.tsspecs/01-constructs/spec.mdspecs/02-definition-graph/spec.mdspecs/05-synthesis/spec.md
💤 Files with no reviewable changes (30)
- packages/core/src/tests/ids.test.ts
- packages/core/src/tests/composables/workflow.test.ts
- packages/core/src/tests/runtime-modes.test.ts
- packages/core/src/composables/run.ts
- packages/core/src/internal/canonical.ts
- packages/core/src/tests/composables/when.test.ts
- packages/core/src/internal/plan.ts
- packages/core/src/tests/helpers/runtime.ts
- packages/core/src/tests/composables/pipeline.test.ts
- packages/core/src/tests/matrix.test.ts
- packages/core/src/runtime.ts
- packages/core/src/composables/matrix.ts
- packages/core/src/tests/composition.test.ts
- packages/core/src/tests/laziness.test.ts
- packages/core/src/tests/composables/parallel.test.ts
- packages/core/src/internal/ids.ts
- packages/core/src/composables/pipeline.ts
- packages/core/src/tests/canonical.test.ts
- packages/core/src/composables/workflow.ts
- packages/core/src/tests/conditions.test.ts
- packages/core/src/tests/composables/run.test.ts
- packages/core/src/internal/conditions.ts
- packages/core/src/tests/dag.test.ts
- packages/core/src/composables/when.ts
- packages/core/src/composables/parallel.ts
- packages/core/src/operation.ts
- packages/core/src/tests/public-api.test.ts
- packages/core/src/internal/merge.ts
- packages/core/src/internal/node.ts
- packages/core/src/tests/errors.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
- GitHub Check: main
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Amazon Q Developer
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: - Noany: Useunknownand narrow. Strict TypeScript.
- Error handling: Custom error classes per package.
Files:
packages/constructs/src/index.tspackages/core/src/index.tspackages/constructs/src/__tests__/model.test.tspackages/constructs/src/errors.tspackages/constructs/src/base.tspackages/core/src/__tests__/graph.test.tspackages/constructs/src/model.tspackages/core/src/__tests__/synthesize.test.tspackages/core/src/synthesize.tspackages/constructs/tsdown.config.tspackages/core/src/__tests__/validate.test.tspackages/constructs/src/__tests__/constructs.test.tspackages/core/src/errors.tspackages/core/src/validate.tspackages/constructs/src/constructs.tspackages/core/src/graph.ts
**/src/index.ts
📄 CodeRabbit inference engine (AGENTS.md)
- Public API: Everything public is exported from
src/index.ts.
Files:
packages/constructs/src/index.tspackages/core/src/index.ts
🧠 Learnings (4)
📚 Learning: 2026-08-12T07:24:02.495Z
Learnt from: CR
Repo: sverka-dev/sverka PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-08-12T07:24:02.495Z
Learning: Applies to **/src/index.ts : - **Public API:** Everything public is exported from `src/index.ts`.
Applied to files:
packages/constructs/package.jsonpackages/constructs/tsconfig.jsonpackages/constructs/src/index.tspackages/core/src/index.tspackages/constructs/tsdown.config.ts
📚 Learning: 2026-08-12T07:24:02.495Z
Learnt from: CR
Repo: sverka-dev/sverka PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-08-12T07:24:02.495Z
Learning: Applies to **/*.{ts,tsx} : - **Error handling:** Custom error classes per package.
Applied to files:
packages/constructs/tsconfig.jsonpackages/constructs/src/errors.tspackages/core/src/errors.ts
📚 Learning: 2026-08-12T07:24:02.495Z
Learnt from: CR
Repo: sverka-dev/sverka PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-08-12T07:24:02.495Z
Learning: Applies to **/*.{ts,tsx} : - **No `any`:** Use `unknown` and narrow. Strict TypeScript.
Applied to files:
packages/constructs/tsconfig.jsonpackages/constructs/tsdown.config.ts
📚 Learning: 2026-08-11T20:47:11.392Z
Learnt from: ThePlenkov
Repo: sverka-dev/sverka PR: 28
File: pack/formulas/wave.toml:27-43
Timestamp: 2026-08-11T20:47:11.392Z
Learning: In `pack/formulas/wave.toml`, the `wave` formula is a process description for the Gas City harness. It documents the architect, builder, reviewer, and mayor workflow steps. It is not executable runtime control flow, so reviewer rejection does not require a machine-readable formula gate in this file.
Applied to files:
engdocs/architecture/v0-wave-A-plan.md
🪛 GitHub Check: SonarCloud Code Analysis
packages/core/src/__tests__/graph.test.ts
[warning] 152-152: Prefer "expect(pipeline.outputs).toHaveLength(1)" over this generic assertion for better reporting; it works on any object with a numeric length property.
[warning] 49-49: Prefer "expect(step.dependencies).toHaveLength(0)" over this generic assertion for better reporting; it works on any object with a numeric length property.
[warning] 151-151: Prefer "expect(pipeline.inputs).toHaveLength(1)" over this generic assertion for better reporting; it works on any object with a numeric length property.
[warning] 30-30: Prefer "expect(graph.project.pipelines).toHaveLength(1)" over this generic assertion for better reporting; it works on any object with a numeric length property.
packages/core/src/__tests__/synthesize.test.ts
[warning] 17-17: Prefer "expect(graph.project.pipelines).toHaveLength(1)" over this generic assertion for better reporting; it works on any object with a numeric length property.
packages/core/src/synthesize.ts
[warning] 16-16: Remove this unused import of 'ProjectDefinition'.
packages/constructs/src/__tests__/constructs.test.ts
[warning] 80-80: Prefer "expect(proj.node.children).toHaveLength(1)" over this generic assertion for better reporting; it works on any object with a numeric length property.
[warning] 83-83: Prefer "expect(pipeline.node.children).toHaveLength(3)" over this generic assertion for better reporting; it works on any object with a numeric length property.
[warning] 84-84: Prefer "expect(pipeline.node.children.filter((c) => c instanceof ShellStep)).toHaveLength(2)" over this generic assertion for better reporting; it works on any object with a numeric length property.
[warning] 85-85: Prefer "expect(pipeline.node.children.filter((c) => c instanceof Entry)).toHaveLength(1)" over this generic assertion for better reporting; it works on any object with a numeric length property.
packages/core/src/validate.ts
[warning] 79-79: Remove this useless assignment to variable "out".
[warning] 78-78: Remove this useless assignment to variable "seen".
[warning] 4-4: Remove this unused import of 'Dependency'.
[warning] 6-6: Remove this unused import of 'OutputDeclaration'.
[failure] 106-106: Refactor this function to reduce its Cognitive Complexity from 25 to the 15 allowed.
packages/constructs/src/constructs.ts
[warning] 4-4: Remove this unused import of 'Construct'.
🪛 LanguageTool
specs/01-constructs/spec.md
[grammar] ~202-~202: Ensure spelling is correct
Context: ...olds command, runtime, outputs, inputs, dependsOn. 4. Entry under Pipeline; holds trigger...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
specs/05-synthesis/spec.md
[style] ~38-~38: The double modal “needs Run” is nonstandard (only accepted in certain dialects). Consider “to be Run”.
Context: ... Trigger reachability validation (needs Run Plan — wave G) - Context reference avai...
(NEEDS_FIXED)
[style] ~123-~123: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...n with shell operation. 3. synthesize with scalar output → exportOutput operation....
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~124-~124: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...exportOutput operation. 4. synthesize with artifact output → exportArtifact operat...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~125-~125: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...portArtifact operation. 5. synthesize with artifact StepRef in inputs → importArti...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~128-~128: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...uts → value dependency. 7. synthesize with dependsOn → control dependency. 8. `s...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~132-~132: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...or(UNKNOWN_PRODUCER). 11. synthesizedetects output collision →SynthesisError(OUTP...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~133-~133: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...or(OUTPUT_COLLISION). 12. synthesizedetects incompatible reference type → Synt...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
🪛 markdownlint-cli2 (0.23.2)
engdocs/architecture/v0-wave-A-plan.md
[warning] 9-9: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 20-20: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
[warning] 34-34: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
specs/05-synthesis/spec.md
[warning] 12-12: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (24)
packages/constructs/src/base.ts (1)
1-6: LGTM!packages/constructs/src/errors.ts (1)
1-17: LGTM!packages/constructs/src/constructs.ts (1)
5-153: LGTM!packages/constructs/tsconfig.json (1)
1-8: LGTM!packages/constructs/tsdown.config.ts (1)
1-8: LGTM!packages/constructs/package.json (1)
1-29: LGTM!packages/constructs/project.json (1)
1-33: LGTM!packages/core/src/errors.ts (1)
1-31: LGTM!packages/core/src/index.ts (1)
1-14: LGTM!packages/constructs/src/model.ts (1)
8-71: LGTM!Also applies to: 77-107
packages/constructs/src/index.ts (1)
3-19: LGTM!packages/constructs/src/__tests__/constructs.test.ts (1)
12-140: LGTM!packages/constructs/src/__tests__/model.test.ts (1)
16-104: LGTM!packages/core/package.json (1)
21-23: LGTM!packages/core/project.json (1)
18-23: LGTM!packages/core/src/graph.ts (1)
4-61: LGTM!packages/core/src/__tests__/graph.test.ts (1)
13-155: LGTM!packages/core/src/validate.ts (1)
12-43: LGTM!packages/core/src/__tests__/synthesize.test.ts (1)
11-63: LGTM!Also applies to: 91-125, 168-262
engdocs/adr/ADR-010-construct-core-boundary.md (1)
1-3: LGTM!Also applies to: 6-60
engdocs/architecture/v0-wave-A-plan.md (1)
1-4: LGTM!Also applies to: 7-8, 14-19, 47-128, 129-130, 146-161, 164-242
specs/01-constructs/spec.md (1)
3-62: LGTM!Also applies to: 70-197
specs/02-definition-graph/spec.md (1)
1-52: LGTM!Also applies to: 60-79, 86-118
specs/05-synthesis/spec.md (1)
1-11: LGTM!Also applies to: 15-37, 39-42, 43-90, 100-102, 110-116, 135-141
Code Review by Qodo
1. Pipeline input names discarded
|
…sing artifact path - validate.ts: remove unused 'seen' Set and empty loop (dead code from Wave A) - synthesize.ts: throw SynthesisError(INVALID_OUTPUT) when artifact output has no path, instead of silently using empty string (defense-in-depth) - errors.ts: add INVALID_OUTPUT to SynthesisErrorCode union Addresses PR #38 review findings. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
82960bd to
77fbf7b
Compare
- Move artifact output validation before construct registration. - Distinguish duplicate-id errors from other construct errors. - Validate unknown producers for dependsOn control dependencies. - Include importArtifact in output collision checks and dedupe duplicate imports. - Use shared resolveStepId for producer ids and fully-qualified importArtifact.from. - Add OutputDefinition/PipelineOutputDefinition to preserve output names and producer stepId. - Make Dependency a discriminated union. - Refactor validateReferenceTypes to reduce cyclomatic complexity. - Add INVALID_SCOPE/INVALID_OUTPUT SynthesisError codes and reject unexpected construct types. - Update specs and tests.
…sing artifact path - validate.ts: remove unused 'seen' Set and empty loop (dead code from Wave A) - synthesize.ts: throw SynthesisError(INVALID_OUTPUT) when artifact output has no path, instead of silently using empty string (defense-in-depth) - errors.ts: add INVALID_OUTPUT to SynthesisErrorCode union Addresses PR #38 review findings. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Move artifact output validation before construct registration. - Distinguish duplicate-id errors from other construct errors. - Validate unknown producers for dependsOn control dependencies. - Include importArtifact in output collision checks and dedupe duplicate imports. - Use shared resolveStepId for producer ids and fully-qualified importArtifact.from. - Add OutputDefinition/PipelineOutputDefinition to preserve output names and producer stepId. - Make Dependency a discriminated union. - Refactor validateReferenceTypes to reduce cyclomatic complexity. - Add INVALID_SCOPE/INVALID_OUTPUT SynthesisError codes and reject unexpected construct types. - Update specs and tests.
43b0c77 to
bda448e
Compare
…sing artifact path - validate.ts: remove unused 'seen' Set and empty loop (dead code from Wave A) - synthesize.ts: throw SynthesisError(INVALID_OUTPUT) when artifact output has no path, instead of silently using empty string (defense-in-depth) - errors.ts: add INVALID_OUTPUT to SynthesisErrorCode union Addresses PR #38 review findings. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Move artifact output validation before construct registration. - Distinguish duplicate-id errors from other construct errors. - Validate unknown producers for dependsOn control dependencies. - Include importArtifact in output collision checks and dedupe duplicate imports. - Use shared resolveStepId for producer ids and fully-qualified importArtifact.from. - Add OutputDefinition/PipelineOutputDefinition to preserve output names and producer stepId. - Make Dependency a discriminated union. - Refactor validateReferenceTypes to reduce cyclomatic complexity. - Add INVALID_SCOPE/INVALID_OUTPUT SynthesisError codes and reject unexpected construct types. - Update specs and tests.
bda448e to
7b825aa
Compare
|
View your CI Pipeline Execution ↗ for commit c956507
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
…sing artifact path - validate.ts: remove unused 'seen' Set and empty loop (dead code from Wave A) - synthesize.ts: throw SynthesisError(INVALID_OUTPUT) when artifact output has no path, instead of silently using empty string (defense-in-depth) - errors.ts: add INVALID_OUTPUT to SynthesisErrorCode union Addresses PR #38 review findings. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Move artifact output validation before construct registration. - Distinguish duplicate-id errors from other construct errors. - Validate unknown producers for dependsOn control dependencies. - Include importArtifact in output collision checks and dedupe duplicate imports. - Use shared resolveStepId for producer ids and fully-qualified importArtifact.from. - Add OutputDefinition/PipelineOutputDefinition to preserve output names and producer stepId. - Make Dependency a discriminated union. - Refactor validateReferenceTypes to reduce cyclomatic complexity. - Add INVALID_SCOPE/INVALID_OUTPUT SynthesisError codes and reject unexpected construct types. - Update specs and tests.
7b825aa to
3d3dc51
Compare
|
New @sverka/constructs package wrapping constructs@10.8.1 with Sverka-specific base classes (SverkaConstruct, Project, Pipeline, Step, ShellStep). Rebuilt @sverka/core around the Definition Graph: Project → Pipeline → Entry/Trigger → Step → Operation with typed References and synthesis lifecycle. - packages/constructs: 5 source files, 2 test files, 20 tests passing - packages/core: 5 source files, 3 test files, 28 tests passing - Specs filled: 01-constructs (211 lines), 02-definition-graph (129), 05-synthesis (141) - Implementation plan: engdocs/architecture/v0-wave-A-plan.md (241 lines, 10-step TDD) - ADR-010: constructs/core package boundary Specs: specs/architecture-spec.md §8, §10, §11, §16 Reviewed and approved by reviewer session. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…sing artifact path - validate.ts: remove unused 'seen' Set and empty loop (dead code from Wave A) - synthesize.ts: throw SynthesisError(INVALID_OUTPUT) when artifact output has no path, instead of silently using empty string (defense-in-depth) - errors.ts: add INVALID_OUTPUT to SynthesisErrorCode union Addresses PR #38 review findings. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Move artifact output validation before construct registration. - Distinguish duplicate-id errors from other construct errors. - Validate unknown producers for dependsOn control dependencies. - Include importArtifact in output collision checks and dedupe duplicate imports. - Use shared resolveStepId for producer ids and fully-qualified importArtifact.from. - Add OutputDefinition/PipelineOutputDefinition to preserve output names and producer stepId. - Make Dependency a discriminated union. - Refactor validateReferenceTypes to reduce cyclomatic complexity. - Add INVALID_SCOPE/INVALID_OUTPUT SynthesisError codes and reject unexpected construct types. - Update specs and tests.
Wave A rebuilt core with the new Definition Graph model but removed the old composables, types, and ID functions that downstream packages (sdk, ir, checks) still depend on. This broke their tests on v0-a-constructs. Restore the old source files and re-export them from index.ts alongside the new API. Each wave that rebuilds a downstream package (B: ir, C: sdk, J: checks) removes its dependency on these compat exports. The compat layer is removed when no longer needed. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Reduce cyclomatic complexity (12→6) and LOC (82→28) by extracting export, import, and control-dependency logic into dedicated functions. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
cad64ec to
c956507
Compare
|
…sing artifact path - validate.ts: remove unused 'seen' Set and empty loop (dead code from Wave A) - synthesize.ts: throw SynthesisError(INVALID_OUTPUT) when artifact output has no path, instead of silently using empty string (defense-in-depth) - errors.ts: add INVALID_OUTPUT to SynthesisErrorCode union Addresses PR #38 review findings. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Move artifact output validation before construct registration. - Distinguish duplicate-id errors from other construct errors. - Validate unknown producers for dependsOn control dependencies. - Include importArtifact in output collision checks and dedupe duplicate imports. - Use shared resolveStepId for producer ids and fully-qualified importArtifact.from. - Add OutputDefinition/PipelineOutputDefinition to preserve output names and producer stepId. - Make Dependency a discriminated union. - Refactor validateReferenceTypes to reduce cyclomatic complexity. - Add INVALID_SCOPE/INVALID_OUTPUT SynthesisError codes and reject unexpected construct types. - Update specs and tests.



User description
Summary
@sverka/constructspackage wrappingconstructs@10.8.1with Sverka-specific base classes (SverkaConstruct, Project, Pipeline, Step, ShellStep)@sverka/corearound the Definition Graph: Project → Pipeline → Entry/Trigger → Step → Operation with typed ReferencesTests: 48 passing (20 constructs + 28 core)
Stacks on: #37 (v0 redesign foundation)
Test plan
packages/constructs— 20 tests passpackages/core— 28 tests passGenerated with Devin
Summary by cubic
Introduces
@sverka/constructsfor authoring Projects/Pipelines/Steps and rebuilds@sverka/coreto synthesize a provider‑neutral Definition Graph with stricter validation and a temporary compat layer. Behavior change: empty artifact output paths now throwConstructError(INVALID_OUTPUT)on construct creation andSynthesisError(INVALID_OUTPUT)on synthesis; duplicate construct ids throwConstructError(DUPLICATE_ID);importArtifact.frommust be fully‑qualified; unknowndependsOntargets and unexpected construct types are rejected.dependsOn), output collisions (includesimportArtifact; duplicate imports deduped), incompatible references, invalid scope, and unexpected construct types; resolves producer ids via a shared resolver.synthesize(project); introducesOutputDefinition/PipelineOutputDefinition(preserves outputnameand producerstepId) and a discriminated‐unionDependency.Migration
@sverka/constructs(Project,Pipeline,ShellStep,Entry) and callsynthesize(project)from@sverka/core; the old core API remains available temporarily.pathfor each artifact output and verifydependsOntargets exist.importArtifact.fromand avoid duplicate imports; update consumers to new core types where referenced (Dependencyunion;OutputDefinition/PipelineOutputDefinition).Written for commit c956507. Summary will update on new commits.
CodeAnt-AI Description
Introduce construct-based pipeline authoring and Definition Graph synthesis
What Changed
@sverka/constructswith Projects, Pipelines, shell Steps, Entries, triggers, inputs, outputs, runtimes, and typed referencesImpact
✅ Typed pipeline and trigger authoring✅ Explicit artifact and value transfer between steps✅ Clearer invalid pipeline errors💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.