feat: add workspace flow harness smoke
This commit is contained in:
parent
5c16e5c36b
commit
27979cb621
9 changed files with 100 additions and 16 deletions
|
|
@ -5,3 +5,16 @@ name = "patch.moi"
|
|||
id = "harness-maintenance-fixture"
|
||||
kind = "command"
|
||||
command = ["bun", "run", "harness:flow"]
|
||||
|
||||
[[workspace.tasks]]
|
||||
id = "harness-maintenance-flow-smoke"
|
||||
kind = "flow"
|
||||
flow = "upstream.release"
|
||||
|
||||
[workspace.tasks.event]
|
||||
source = "patch.moi.workspace"
|
||||
|
||||
[workspace.tasks.event.payload]
|
||||
repo = "peezy-tech/patch-moi-harness"
|
||||
tag = "v0.1.3"
|
||||
url = "https://github.com/peezy-tech/patch-moi-harness/releases/tag/v0.1.3"
|
||||
|
|
|
|||
6
bun.lock
6
bun.lock
|
|
@ -5,7 +5,7 @@
|
|||
"": {
|
||||
"name": "@peezy.tech/patch",
|
||||
"devDependencies": {
|
||||
"@peezy.tech/codex-flows": "^0.3.3",
|
||||
"@peezy.tech/codex-flows": "^0.3.4",
|
||||
"@peezy.tech/flow-runtime": "^0.4.0",
|
||||
},
|
||||
},
|
||||
|
|
@ -91,7 +91,7 @@
|
|||
|
||||
"@oxc-project/types": ["@oxc-project/types@0.130.0", "", {}, "sha512-ibD2usx9JRu7f5pu2tMKMI4cpA4NgXJQoYRP4pQ7Pxmn1l6k/53qWtQWZayhYy3X4QZkt90Ot+mJEaeXouio6Q=="],
|
||||
|
||||
"@peezy.tech/codex-flows": ["@peezy.tech/codex-flows@0.3.3", "", { "bin": { "codex-flows": "dist/cli/index.js" } }, "sha512-crhGJ8YsdqxKoqpulkKprIz+rCeULiQ6HmsDZIec4NJPg04AVv6PXmPJPHXlRJN8DhdDAomRZ8Codm0nuRObhQ=="],
|
||||
"@peezy.tech/codex-flows": ["@peezy.tech/codex-flows@0.3.4", "", { "bin": { "codex-flows": "dist/cli/index.js" } }, "sha512-ScggyelL6q9EKxqjrJhvyF7o6A7+naK4GkkB44aF5sSs06fANn1Uw/zN2Qmv3CuCFpSDCeg5I8fL+ro8PQGTFw=="],
|
||||
|
||||
"@peezy.tech/flow-runtime": ["@peezy.tech/flow-runtime@0.4.0", "", { "dependencies": { "@peezy.tech/codex-flows": "^0.3.1" } }, "sha512-HJ0witZkQ2l+tzB/bONB+hV4aPmjc0jOOoUu01gPHo2NFJ/qfJ8bMbUe7jdCvfvDCqStr6RZooS2FiF/OLGs6A=="],
|
||||
|
||||
|
|
@ -873,6 +873,8 @@
|
|||
|
||||
"@apidevtools/json-schema-ref-parser/js-yaml": ["js-yaml@4.1.1", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA=="],
|
||||
|
||||
"@peezy.tech/flow-runtime/@peezy.tech/codex-flows": ["@peezy.tech/codex-flows@0.3.3", "", { "bin": { "codex-flows": "dist/cli/index.js" } }, "sha512-crhGJ8YsdqxKoqpulkKprIz+rCeULiQ6HmsDZIec4NJPg04AVv6PXmPJPHXlRJN8DhdDAomRZ8Codm0nuRObhQ=="],
|
||||
|
||||
"@rollup/pluginutils/estree-walker": ["estree-walker@2.0.2", "", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="],
|
||||
|
||||
"hast-util-raw/parse5": ["parse5@7.3.0", "", { "dependencies": { "entities": "^6.0.0" } }, "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw=="],
|
||||
|
|
|
|||
|
|
@ -58,16 +58,19 @@ the first task is a manual command task that runs the existing harness fixture:
|
|||
bun run workspace:run:harness
|
||||
```
|
||||
|
||||
That task is deliberately `kind = "command"`, not an implicit workspace
|
||||
`kind = "flow"` task. Released workspace flow fallback behavior must not be
|
||||
treated as a source of patch.moi's deterministic `id`, `occurredAt`, or
|
||||
`receivedAt`; a future flow task must supply a complete explicit event.
|
||||
That task remains deliberately `kind = "command"`, because it is the no-backend
|
||||
local harness path. The repository also includes an explicit manual
|
||||
`kind = "flow"` smoke task for operator experiments:
|
||||
|
||||
The sibling `../codex-flows` workspace currently has an unreleased fix that
|
||||
synthesizes those event fields for workspace-owned flow tasks. patch.moi should
|
||||
not rely on that behavior until it is available in a published
|
||||
`@peezy.tech/codex-flows` release, and it should not use workspace-generated
|
||||
event ids for feed-owned maintenance attempts.
|
||||
```bash
|
||||
bun run workspace:run:harness-flow
|
||||
```
|
||||
|
||||
That flow task requires a running workspace backend URL. In
|
||||
`@peezy.tech/codex-flows@0.3.4`, workspace-owned flow tasks synthesize unique
|
||||
`id`, `occurredAt`, and `receivedAt` fields for every run. Those ids are useful
|
||||
for workspace automation, but patch.moi must not use workspace-generated ids
|
||||
for feed-owned maintenance attempts.
|
||||
|
||||
The generated local state under `.codex/workspace/local/` is run history for
|
||||
the operator automation surface. It does not replace `DATA_DIR` feed events,
|
||||
|
|
|
|||
|
|
@ -73,6 +73,23 @@ CODEX_FLOW_FETCH=0 CODEX_FLOW_PUSH=0 bun run workspace:run:harness
|
|||
That task writes local run state under `.codex/workspace/local/`, which is
|
||||
ignored by Git.
|
||||
|
||||
There is also a manual workspace-owned flow smoke task:
|
||||
|
||||
```bash
|
||||
cd ../codex-flows
|
||||
bun run workspace:backend --cwd /home/peezy/meta-workspace/patch.moi
|
||||
```
|
||||
|
||||
```bash
|
||||
CODEX_WORKSPACE_BACKEND_WS_URL=ws://127.0.0.1:3586 \
|
||||
CODEX_FLOW_FETCH=0 CODEX_FLOW_PUSH=0 \
|
||||
bun run workspace:run:harness-flow
|
||||
```
|
||||
|
||||
That path requires a running Codex workspace backend. Use it to inspect backend
|
||||
event and run records; keep patch.moi feed-owned maintenance attempts on the
|
||||
Patch dispatch path.
|
||||
|
||||
Local mode is checkout-oriented. Service mode is forge-oriented: patch.moi
|
||||
should talk to the remote forge, trigger a runner, and let that runner perform
|
||||
the disposable checkout and patch application work.
|
||||
|
|
|
|||
|
|
@ -74,6 +74,15 @@ bun run workspace:doctor
|
|||
CODEX_FLOW_FETCH=0 CODEX_FLOW_PUSH=0 bun run workspace:run:harness
|
||||
```
|
||||
|
||||
Run the manual workspace-owned flow smoke task only when a Codex workspace
|
||||
backend is running:
|
||||
|
||||
```bash
|
||||
CODEX_WORKSPACE_BACKEND_WS_URL=ws://127.0.0.1:3586 \
|
||||
CODEX_FLOW_FETCH=0 CODEX_FLOW_PUSH=0 \
|
||||
bun run workspace:run:harness-flow
|
||||
```
|
||||
|
||||
Start the Patch service when you want feed intake and admin state:
|
||||
|
||||
```bash
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ These published packages define the current patch.moi integration baseline:
|
|||
|
||||
| Package | Published version | patch.moi use |
|
||||
| --- | --- | --- |
|
||||
| `@peezy.tech/codex-flows` | `0.3.3` | repo-native workspace commands and CLI automation |
|
||||
| `@peezy.tech/codex-flows` | `0.3.4` | repo-native workspace commands and CLI automation |
|
||||
| `@peezy.tech/flow-runtime` | `0.4.0` | local flow discovery, matching, execution, and Bun flow helpers |
|
||||
| `@peezy.tech/flow-backend-convex` | `0.4.0` | optional generic durable flow backend for future service experiments |
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ package is `flows/patch-moi-harness`.
|
|||
There are two local operator paths:
|
||||
|
||||
- run the flow directly with `bun run harness:flow`
|
||||
- run the same flow through the repo-native `codex-flows workspace` task
|
||||
- run the same flow through the repo-native command workspace task
|
||||
|
||||
Both paths exercise the harness. The Patch service path still starts with feed
|
||||
intake, writes `DATA_DIR` records, creates a maintenance attempt, and dispatches
|
||||
|
|
@ -61,7 +61,30 @@ operator action.
|
|||
Use `bun run workspace:doctor` to inspect the repo-native workspace config and
|
||||
generated local run state. The generated local state is ignored by Git.
|
||||
|
||||
## 4. Rehearse a real upstream release
|
||||
## 4. Try the workspace flow smoke task
|
||||
|
||||
The experimental workspace flow task dispatches a generated `upstream.release`
|
||||
event through a running Codex workspace backend:
|
||||
|
||||
```bash
|
||||
cd ../codex-flows
|
||||
bun run workspace:backend --cwd /home/peezy/meta-workspace/patch.moi
|
||||
```
|
||||
|
||||
Then, from the patch.moi repo:
|
||||
|
||||
```bash
|
||||
CODEX_WORKSPACE_BACKEND_WS_URL=ws://127.0.0.1:3586 \
|
||||
CODEX_FLOW_FETCH=0 \
|
||||
CODEX_FLOW_PUSH=0 \
|
||||
bun run workspace:run:harness-flow
|
||||
```
|
||||
|
||||
Use this only to exercise workspace-owned automation. It is not the product
|
||||
path for patch.moi feed intake, and it does not write patch.moi `DATA_DIR`
|
||||
maintenance-attempt records unless patch.moi itself dispatches the event.
|
||||
|
||||
## 5. Rehearse a real upstream release
|
||||
|
||||
Create a new upstream release in `harness/upstream`, then point the fixture or a
|
||||
feed event at the new tag:
|
||||
|
|
@ -88,7 +111,7 @@ identify the new upstream tag. The flow rebases `harness/fork` onto that tag,
|
|||
verifies the fork package, reports the local candidate branch, and keeps pushes
|
||||
off.
|
||||
|
||||
## 5. Push only after review
|
||||
## 6. Push only after review
|
||||
|
||||
When the local result is the maintained fork state you want:
|
||||
|
||||
|
|
|
|||
|
|
@ -24,3 +24,19 @@ CODEX_FLOW_PUSH=1 bun run harness:flow
|
|||
The fixture event is `fixtures/upstream-release-v0.1.3.json`. It should be a
|
||||
no-op rebase against the current harness fork while still verifying the package
|
||||
surface and reporting the local maintained branch as the candidate ref.
|
||||
|
||||
The repo also exposes an experimental workspace-owned flow smoke task:
|
||||
|
||||
```bash
|
||||
cd ../codex-flows
|
||||
bun run workspace:backend --cwd /home/peezy/meta-workspace/patch.moi
|
||||
```
|
||||
|
||||
```bash
|
||||
CODEX_WORKSPACE_BACKEND_WS_URL=ws://127.0.0.1:3586 \
|
||||
CODEX_FLOW_FETCH=0 CODEX_FLOW_PUSH=0 \
|
||||
bun run workspace:run:harness-flow
|
||||
```
|
||||
|
||||
That task requires a running Codex workspace backend and writes backend
|
||||
event/run state, not patch.moi `DATA_DIR` maintenance-attempt state.
|
||||
|
|
|
|||
|
|
@ -37,10 +37,11 @@
|
|||
"test": "bun run --filter @peezy.tech/patch test",
|
||||
"workspace:doctor": "codex-flows workspace doctor --workspace-root .",
|
||||
"workspace:run:harness": "codex-flows workspace run harness-maintenance-fixture --workspace-root . --mode local",
|
||||
"workspace:run:harness-flow": "codex-flows workspace run harness-maintenance-flow-smoke --workspace-root . --mode local",
|
||||
"workspace:tick": "codex-flows workspace tick --workspace-root . --mode local"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@peezy.tech/codex-flows": "^0.3.3",
|
||||
"@peezy.tech/codex-flows": "^0.3.4",
|
||||
"@peezy.tech/flow-runtime": "^0.4.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue