Initial curated projectbrain source from 8a7b1e0651dbdab97d744cbd2e653ab3970ac6c5
This commit is contained in:
commit
5aa3e8d685
700 files changed
+132801
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { assertFeatureDeliveryTransition, canTransitionFeatureDeliveryStatus } from "../src/repositories/featureDeliveryRepository.js";
|
||||
|
||||
describe("feature delivery lifecycle invariants", () => {
|
||||
it("allows only forward operational progress and explicit repair paths", () => {
|
||||
expect(canTransitionFeatureDeliveryStatus("executing", "validating")).toBe(true);
|
||||
expect(canTransitionFeatureDeliveryStatus("pull_request_open", "merged")).toBe(true);
|
||||
expect(canTransitionFeatureDeliveryStatus("merged", "verified")).toBe(true);
|
||||
expect(canTransitionFeatureDeliveryStatus("verified", "released")).toBe(true);
|
||||
expect(canTransitionFeatureDeliveryStatus("released", "executing")).toBe(false);
|
||||
expect(canTransitionFeatureDeliveryStatus("verified", "awaiting_approval")).toBe(false);
|
||||
expect(canTransitionFeatureDeliveryStatus("superseded", "approved")).toBe(false);
|
||||
});
|
||||
|
||||
it("rejects a transition that would reactivate superseded or released work", () => {
|
||||
expect(() => assertFeatureDeliveryTransition("superseded", "executing")).toThrow("FEATURE_DELIVERY_INVALID_TRANSITION");
|
||||
expect(() => assertFeatureDeliveryTransition("released", "approved")).toThrow("FEATURE_DELIVERY_INVALID_TRANSITION");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user