Repository navigation
Implement interface-driven SDLC pipeline with profiles and state machines - #69
Merged
Merged
Conversation
…es, profiles Complete implementation of the SDLC domain modeling workload from domain-modeling-comprehensive.md, covering Phases 1-3 of the remediation plan (D1-D7, D13, D16 partially): Phase 1 — Domain Interface Layer (D1, D2, D3): - Add 6 abstract interfaces in dsl/interfaces/: IssueProvider, ClaimStore, OutcomeLedger, AgentProvider, SignalStore, ArtifactStore - Update concrete services to declare interface implementations: github.Issues : IssueProvider, sdlc.ControlPlane : ClaimStore+OutcomeLedger, agent.Codex : AgentProvider - Update pipelines/sdlc.dag to depend on interfaces via `uses` declarations instead of importing concrete services directly Phase 2 — State Machine Formalization (D6, D7): - Add TerminalFailed variant to IssueLifecycleStage - Create std/state_machines.dag with validate_transition, validate_transition_with_budget, determine_stage, stage_to_label, transition_labels, and transition guard definitions - Pipeline now uses transition_labels for CAS label transitions Phase 3 — Profile Binding (D4, D5): - Create 3 deployment profiles in dsl/profiles/: unit_test (in-memory stubs), local (file-backed + GitHub API), cloud_run (GCS + Pub/Sub + GitHub API) - Each profile includes stub/concrete service implementations with credential resolution via env() and secret() Type completeness: - Add 26 domain types to std/types.dag: IntentSheet, IssueBinding, StageRunKey, ClaimLease, StageOutcome, Artifact, ArtifactMarker, Signal, InfraIntent, RetryPolicy, FailureClass, AgentStatus, ApprovalMode, CredentialBinding, ExecutionMetrics, AuditEntry, and supporting enums (IssueState, BindingStatus, OutcomeStatus, ArtifactType, ArtifactPayload, MarkerKind, SignalType, RuntimeProfile, LaunchConfig, CredentialIntent, CredentialResolution, AuditAction) Update domain-modeling-comprehensive.md: deficit status table, type completeness checklist, and phase implementation status. https://claude.ai/code/session_011mYyPF3HZPNtga6HZBpoPt
DSL layer (Phases 5-6): - D10: Code review + acceptance testing stages in sdlc.dag (PR diff, LLM review, cargo test/clippy, PR merge) - D11: Agent branch management (git branch create, agent spawn, PR create) - D12: PipelineParams type with injectable defaults - D14: Temporal types (Timestamp, EpochMs, Duration) in std/types.dag - D15: Branded nominal types (@brand on IssueId, RunKey, ArtifactId, etc.) - D17: Reconciliation loop pipeline (pipelines/reconciler.dag) with 3-stage convergence check - D18: approval_yield pattern in std/patterns.dag (INV-22) Compiler/runtime layer (Phase 4): - D8: PipelineDispatchOp replaces UnsupportedOp for LoweredOp::Pipeline nodes; domain_passthrough_op! entries for pipelines.sdlc and pipelines.reconciler modules - D9: dispatch_pipeline_stage() in sdlc.rs routes all lifecycle stages through compiled DAG dispatch All 18 deficits (D1-D18) now addressed across Phases 1-6. https://claude.ai/code/session_011mYyPF3HZPNtga6HZBpoPt
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 424ea023d9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… branch wiring
1. Add 'done' to sdlc_labels() so the worker discovers issues that
reached the done stage but weren't closed (e.g., after a crash).
Add handle_done() handler to close the issue.
2. Gate replay-skip on successful prior outcome status. Previously any
prior outcome (including Failed) caused a skip, preventing retries.
Now only skip when prior.outcome_status == "Success".
3. Use provider_issue_id() (raw issue number) for IssueProvider calls
instead of make_issue_id() (composite "owner/repo#number" key).
The composite format is for internal ledger/claim keys only — passing
it as the provider id produced invalid GitHub API paths.
4. Wire branch into Codex Spawn: add branch input param and --branch
CLI flag so agent execution uses the deterministic sdlc/issue-{N}
branch instead of whatever branch is currently checked out.
https://claude.ai/code/session_011mYyPF3HZPNtga6HZBpoPt
…codegen freshness step Three issues blocked CI after commit 424ea02: 1. dsl/std/patterns.dag had `import` statements at line 327, after item declarations had started. The DSL compiler requires all imports at the top of the module. Moved them to the import block. 2. The `approval_yield` pattern used `uses` clauses (service dependency injection), which is a pipeline-level construct not supported on patterns. Since it's not called from any pipeline yet, converted it to a documented specification comment until the compiler adds support. 3. The freshness chain (codegen-dag → testgen → pragma → clippy) was missing the Rust codegen step that generates target/codegen/bin/ CLI entry points. Added `codegen` step before `clippy` so binary targets exist when cargo clippy --workspace runs. Also added `reconciler` to intentionally_unmapped_dsl_pipeline_modules() since pipelines/reconciler.dag was added in 424ea02 without a codegen mapping. https://claude.ai/code/session_011mYyPF3HZPNtga6HZBpoPt
…s, close guard 1. Stop classifying Success as terminal in reconciler. Previously is_terminal() returned true for "Success", causing the reconciler to treat successful-but-unfinished issues as converged. Now Success flows to a new branch that emits a WorkReady signal to re-apply the missed label transition. 2. Pass backward transition into retry budget validation. The retry branch was calling validate_transition_with_budget(from: stage, to: stage) which is an invalid same-stage transition that never decrements budget. Now uses retry_target() to map each stage to its legal backward edge (e.g., Testing -> Implementing). 3. Gate issue closing on acceptance test success. The close stage was unconditional after acceptance, so failed test runs could still apply the Done label and close the issue. Added a when guard: test_result.success && clippy_result.success. https://claude.ai/code/session_011mYyPF3HZPNtga6HZBpoPt
This was referenced May 6, 2026
briansrls
added a commit
that referenced
this pull request
May 10, 2026
briansrls
added a commit
that referenced
this pull request
May 10, 2026
This was referenced May 10, 2026
briansrls
added a commit
that referenced
this pull request
May 10, 2026
…rows #9/#10/#11 Reviewer (claude-opus-4-7 on PR #2648) flagged that the prior status text on rows #9, #10, #11 carried Director/PM-ratified semantic qualifiers that must not be silently elided when citing a new slice receipt: - #9 `l4_emit_eval_match`: §1.7 corpus-quantified rule — slice receipts ≠ ledger closure; PASSING requires every certification-corpus program. Reverted to CONSUMER_LANDED; PR #2585 cited as additional slice evidence. - #10 `l7_algebraic_laws_witnessed`: PASSING requires exhaustive per-(algebra, inhabitant, law) §Acceptance coverage; distributivity / lattice absorption / non-AlgebraicLawKind laws remain substrate §P1. Reverted to CONSUMER_LANDED; PR #2602 cited as incremental advancement. - #11 `tc1_eta_equivalence_executable`: Director (a)-disposition 2026-05-09 held this canvas-deferred past R3 absent #1972 substrate canvas-tier work. Reverted to DECLARED-through-R3; PR #2603 cited as scaffold advancement but not retiring the canvas-deferral (which would require fresh Director ratification). Other 14 rows in the batch (#12, #14, #31, #43-52, #69) did not carry such qualifiers and stay flipped to PASSING. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
briansrls
added a commit
that referenced
this pull request
May 10, 2026
…2648) * docs(r3): §1.8 ledger-receipt sync — 2026-05-10 batch (V Mgr lane) Flip §1.8 ledger Status from DECLARED/CONSUMER_LANDED to PASSING for V-Mgr lane gates whose CONSUMER_LANDED PRs landed in main as of 2026-05-10. Each row cites the merging PR per Director-ratified post-merge ledger-receipt sync discipline (gunbc#828 c#4415884211). Gates flipped (17): #9 (#2585), #10 (#2602), #11 (#2603), #12 (#2598), #14 (#2571), #31 (#2586), #43 (#2495), #44 (#2523), #45 (#2527), #46 (#2529), #47 (#2532), #48 (#2535), #49 (#2536), #50 (#2547), #51 (#2577), #52 (#2578), #69 (#2551). Skipped per discipline: #15 (PR #2604 not landed); #35 already PASSING. Doc-only; no code or test changes. Closes #2640. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(r3): preserve corpus-quantified + canvas-deferral qualifiers on rows #9/#10/#11 Reviewer (claude-opus-4-7 on PR #2648) flagged that the prior status text on rows #9, #10, #11 carried Director/PM-ratified semantic qualifiers that must not be silently elided when citing a new slice receipt: - #9 `l4_emit_eval_match`: §1.7 corpus-quantified rule — slice receipts ≠ ledger closure; PASSING requires every certification-corpus program. Reverted to CONSUMER_LANDED; PR #2585 cited as additional slice evidence. - #10 `l7_algebraic_laws_witnessed`: PASSING requires exhaustive per-(algebra, inhabitant, law) §Acceptance coverage; distributivity / lattice absorption / non-AlgebraicLawKind laws remain substrate §P1. Reverted to CONSUMER_LANDED; PR #2602 cited as incremental advancement. - #11 `tc1_eta_equivalence_executable`: Director (a)-disposition 2026-05-09 held this canvas-deferred past R3 absent #1972 substrate canvas-tier work. Reverted to DECLARED-through-R3; PR #2603 cited as scaffold advancement but not retiring the canvas-deferral (which would require fresh Director ratification). Other 14 rows in the batch (#12, #14, #31, #43-52, #69) did not carry such qualifiers and stay flipped to PASSING. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Merge origin/main into ledger-receipt sync (preserve row #13 update from main) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements the complete interface-driven architecture for the SDLC pipeline, addressing all 18 modeling deficits (D1–D18) from the domain-modeling-comprehensive.md specification. The pipeline now depends on abstract interfaces rather than concrete services, with compile-time profile binding selecting implementations. Formal state machine validation, retry budget enforcement, and a reconciliation loop ensure correctness and eventual consistency.
Key Changes
Domain Interfaces (D1–D3)
dsl/interfaces/:IssueProvider— issue lifecycle management (discover, get, create, comment, set_labels, close, list_events)ClaimStore— distributed claim leases with CAS semantics (acquire, heartbeat, release)OutcomeLedger— durable stage outcome storage (upsert, get)SignalStore— at-least-once signal delivery (emit, consume, ack)ArtifactStore— artifact storage with two-phase commit (store, retrieve, mark)AgentProvider— agent execution and lifecycle (spawn, status, cancel)Deployment Profiles (D4–D5)
dsl/profiles/:unit_test.dag— in-memory stubs for hermetic testinglocal.dag— file-backed stores + GitHub API for local developmentcloud_run.dag— GCS + Pub/Sub + GitHub API for GCP productionenv()andsecret()helpersState Machine Validation (D6–D7)
dsl/std/state_machines.dagmodule formalizes the IssueLifecycleStage state machine:validate_transition()— checks legal forward/backward transitionsvalidate_transition_with_budget()— enforces retry budget decrement on backward transitionsstage_ordinal()— maps stages to numeric positions for transition classificationis_legal_forward(),is_legal_backward()— transition type classificationstage_to_label(),transition_labels()— label encoding/decodingTerminalFailedstage for unrecoverable failures (budget exhausted)Type System Enhancements (D14–D15)
dsl/std/types.dag:Timestamp— ISO 8601 string refinementDuration,EpochMs— millisecond-based time refinementsIntentId,IssueId,RunKey,ArtifactId,LeaseToken,WorkerId,CommentId,SignalKey,ContentHashIssueState,BindingStatus,IntentSheet,IssueBinding,StageRunKey,StageOutcome,OutcomeStatus,RetryPolicy,Signal,SignalType,ApprovalModePipeline Refactoring (D9, D12)
dsl/pipelines/sdlc.dag:PipelineParamstype for injectable parameters (repo_owner, repo_name, issue_number, llm_provider, llm_model, retry_budget, worker_id, agent_model, agent_timeout)usesclausesissues.get(),claims.acquire(),outcomes.upsert())when current_stage == Idea)marker: "sdlc:design-artifact")https://claude.ai/code/session_011mYyPF3HZPNtga6HZBpoPt