Skip to content

Commit a29fa7f

Browse files
committed
docs(plan): add Phase 4 implementation sequence diagram
1 parent 31364a1 commit a29fa7f

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Phase 4 Sequence Diagram (Implementation Order)
2+
3+
```mermaid
4+
sequenceDiagram
5+
autonumber
6+
actor DRI as Human DRI
7+
participant Agent as Coding Agent
8+
participant Tests as Unit/IT Tests
9+
participant Build as Maven Build
10+
participant Repo as Git Branch
11+
participant CI as GitHub Actions CI
12+
13+
Note over DRI,CI: Phase 4 invariant: native implementation scope is Ubuntu 24.04 linux-x64 only.
14+
Note over DRI,CI: Out of scope in this phase: linux-arm64, linuxmusl-x64, linuxmusl-arm64, darwin-x64, darwin-arm64, win32-x64, win32-arm64.
15+
16+
DRI->>Agent: Start Phase 4 implementation
17+
18+
rect rgba(240, 248, 255, 0.6)
19+
Note over Agent,Build: TDD cycle applied to each implementation step
20+
loop For each step (4.1, 4.2, 4.3, 4.4, 4.5, 4.6a, 4.6b, 4.7, 4.8)
21+
Agent->>Tests: Write tests first (red)
22+
Agent->>Agent: Implement minimum production code (green)
23+
Agent->>Agent: Refactor and run spotless
24+
Agent->>Build: Run mvn verify (current + all prior steps)
25+
Build-->>Agent: Gate pass/fail
26+
alt Gate fails
27+
Agent->>Agent: Fix code/tests and re-run gate
28+
else Gate passes
29+
Agent->>Repo: Commit step
30+
end
31+
end
32+
end
33+
34+
Note over Agent,Tests: Step 4.1: PlatformDetector (linux-x64 correctness gate in this phase)
35+
Note over Agent,Tests: Step 4.2: NativeRuntimeLoader (linux-x64 extraction/cache now; uber-jar multi-platform readiness noted for future)
36+
Note over Agent,Tests: Step 4.3: NativeBinding + JnaNativeBinding + OutboundCallback
37+
Note over Agent,Tests: Step 4.4: FfiRuntimeHost lifecycle + callback drain + write/close safety
38+
Note over Agent,Tests: Step 4.5: RuntimeConnection integration in CopilotClient + env var resolution + compatibility validation
39+
40+
Agent->>Build: Execute Step 4.6a (reactor restructure)
41+
Build-->>Agent: Parent/sdk module structure green
42+
43+
Agent->>Build: Execute Step 4.6b (copilot-native packaging)
44+
Note over Agent,Build: Current phase: package linux-x64 classifier only; verify SHA-512 for linux-x64 tarball.
45+
Build-->>Agent: linux-x64 classifier JAR produced
46+
47+
alt Step 4.6c requested now
48+
Agent-->>DRI: Deferred by Phase 4 invariant policy for this round
49+
else Step 4.6c not required now
50+
Note over Agent,DRI: Keep 4.6c deferred in this phase.
51+
end
52+
53+
Agent->>Tests: Execute Step 4.7 InProcessTransportIT (real runtime.node)
54+
Tests-->>Agent: In-process linux-x64 flow verified
55+
56+
Agent->>CI: Update Step 4.8 workflow
57+
Note over Agent,CI: InProcess CI coverage in this phase: ubuntu-latest (linux-x64) only.
58+
CI-->>Agent: CI green
59+
60+
Agent->>Repo: Final Phase 4 ordered changes committed
61+
Agent->>Repo: Push branch updates
62+
Repo-->>DRI: Ready for human ordering/flow review
63+
```

0 commit comments

Comments
 (0)