Skip to content

Commit f8e4d8c

Browse files
committed
Update CleanApp Wire audit after processor migration
1 parent 871fc34 commit f8e4d8c

File tree

1 file changed

+67
-81
lines changed

1 file changed

+67
-81
lines changed

docs/cleanapp-wire.md

Lines changed: 67 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CleanApp Wire Audit
22

3-
Status audited against repository state at commit `b013dd1` on 2026-03-07.
3+
Status audited against repository state at commit `871fc3451836` on 2026-03-08.
44

55
Note: no standalone audit-matrix file was attached with the request. The matrix below is derived from the acceptance sections in `/Users/anon16/Downloads/casp_spec_for_clean_app.md`, with `CASP` interpreted as `CleanApp Wire`.
66

@@ -18,7 +18,7 @@ CleanApp Wire is implemented and live as a public machine-ingest surface on `rep
1818
- lane assignment
1919
- transport-level idempotency
2020

21-
The current implementation is not yet the canonical ingestion core for all machine-originated reports.
21+
The current implementation is not yet the canonical ingestion core for all machine-originated reports, but it is now much closer in practice.
2222

2323
Today, Wire is a thin orchestration layer on top of the older fetcher-v1 ingest path:
2424

@@ -31,8 +31,8 @@ That means the protocol is real, but the system architecture is transitional.
3131

3232
The largest implementation gap is architectural, not endpoint-level:
3333

34-
1. several internal machine producers still bypass Wire entirely
35-
2. Wire still depends on the older v1 ingest implementation rather than owning canonical ingest storage/publish directly
34+
1. legacy `/api/v3/reports/bulk_ingest` and `/api/v4/reports/bulk_ingest` callers still do not receive Wire-native receipts/status semantics directly
35+
2. Wire still depends on the older v1 ingest implementation for canonical report persistence/publish rather than owning that core directly
3636
3. dedupe clustering, rewards, and integrity controls are mostly scaffolding rather than full production behavior
3737

3838
## Acceptance Audit Matrix
@@ -60,9 +60,9 @@ The largest implementation gap is architectural, not endpoint-level:
6060
| Validation rules | Partial | `report-listener/handlers/cleanapp_wire_v1.go` | Core schema/field/confidence validation is implemented with machine-readable codes. MIME allowlists, timestamp drift checks, and richer category compatibility validation are not yet present. |
6161
| Queue and processing architecture | Partial | `report-listener/handlers/cleanapp_wire_v1.go`, `report-listener/handlers/ingest_v1.go`, `report-listener/config/config.go`, `report-analyze-pipeline` consumers | Wire currently publishes into the existing `report.raw` flow through v1 ingest. The dedicated `casp.*` / Wire-native queue graph from the spec does not exist yet. |
6262
| Governance and auditability | Partial | `report-listener/database/cleanapp_wire_v1.go`, `report-listener/database/migration_helpers.go`, `report-listener/handlers/internal_fetcher_admin.go`, `report-listener/handlers/fetcher_promotion_v1.go` | Submission records, receipts, promotion requests, and moderation events exist. Full decision traces, rule-versioning, and reconstruction of every lane decision are not yet implemented. |
63-
| Rollout plan | Partial | `report-listener/main.go`, `cli/cleanapp`, `openclaw/cleanapp_ingest_skill`, `news-indexer-bluesky/src/bin/submitter_bluesky.rs` | Wire is now the default path for the Bluesky submitter, the npm CLI, and the OpenClaw ingest skill. Internal-bot migration is still incomplete because legacy v1/v3 machine-ingest routes and `report-processor` still bypass Wire semantics directly. |
63+
| Rollout plan | Partial | `report-listener/main.go`, `report-listener/handlers/ingest_v1.go`, `cli/cleanapp`, `openclaw/cleanapp_ingest_skill`, `news-indexer-bluesky/src/bin/submitter_bluesky.rs`, `report-processor/handlers/handlers.go` | Wire is now the default path for the Bluesky submitter, the npm CLI, the OpenClaw ingest skill, and `report-processor`. Legacy v1 ingest now translates into Wire semantics internally. The remaining migration gap is mainly legacy v3/v4 machine-ingest callers, which are mirrored into Wire provenance but do not yet receive Wire-native receipts directly. |
6464
| Operational metrics | Partial | `report-listener/database/fetcher_keys_v1.go`, `report-listener/database/cleanapp_wire_v1.go`, `report-listener/database/ingestion_audit_v1.go` | Basic usage quotas and ingestion audits exist. The richer operational metrics suite from the spec is not fully implemented. |
65-
| Non-negotiable rules | Partial | `report-listener/main.go`, `news-indexer-bluesky/src/bin/submitter_bluesky.rs`, `openclaw/cleanapp_ingest_skill/ingest.py`, `cli/cleanapp/src/commands/reports/submit.ts`, `report-processor/handlers/handlers.go` | Rule 1 is currently false: not all internal agentic ingestion goes through Wire. Rule 3 is mostly true. Rules around rewards, provenance integrity, and duplicate-vs-corroboration are only partial. |
65+
| Non-negotiable rules | Partial | `report-listener/main.go`, `news-indexer-bluesky/src/bin/submitter_bluesky.rs`, `openclaw/cleanapp_ingest_skill/ingest.py`, `cli/cleanapp/src/commands/reports/submit.ts`, `report-processor/handlers/handlers.go`, `report-listener/handlers/handlers.go` | Rule 1 is substantially true for the major machine producers now migrated onto Wire. The remaining exception is compatibility traffic through legacy v3/v4 bulk-ingest routes, which still return legacy responses even though provenance is mirrored into Wire internally. Rules around rewards, provenance integrity, and duplicate-vs-corroboration are still only partial. |
6666

6767
## Current Implementation Reality
6868

@@ -153,7 +153,7 @@ Files:
153153

154154
## Legacy Ingestion Paths That Bypass Wire
155155

156-
These still bypass Wire entirely or target older ingestion surfaces directly.
156+
These no longer all bypass Wire entirely. Some are now compatibility routes that translate into or mirror into Wire semantics internally, while others remain intentionally outside Wire.
157157

158158
### 1. Legacy protected v3/v4 bulk ingest
159159

@@ -167,12 +167,16 @@ Routes:
167167
- `POST /api/v3/reports/bulk_ingest`
168168
- `POST /api/v4/reports/bulk_ingest`
169169

170-
Why it bypasses Wire:
170+
Current state:
171+
172+
- legacy `/api/v3` and `/api/v4` bulk ingest still execute their existing external contract
173+
- accepted machine-originated submissions are mirrored into Wire provenance/receipt state internally
174+
- callers still do not receive Wire-native receipt/status semantics directly
171175

172-
- no Wire receipt
173-
- no Wire quality score
174-
- no Wire lane assignment
175-
- no Wire reputation tracking
176+
Why it still matters:
177+
178+
- external callers still experience the legacy contract
179+
- migration debt can remain hidden because internal provenance exists even when external semantics do not
176180

177181
### 2. Fetcher v1 ingest surface
178182

@@ -186,19 +190,15 @@ Route:
186190

187191
- `POST /v1/reports:bulkIngest`
188192

189-
Why it bypasses Wire:
193+
Current state:
190194

191-
- no Wire envelope
192-
- no Wire receipt/status model
193-
- no Wire quality scoring
194-
- no Wire-specific reputation update beyond generic fetcher usage
195+
- direct `/v1/reports:bulkIngest` calls are now translated item-by-item into Wire submissions internally
196+
- callers still receive the legacy v1 response shape
197+
- Wire still uses v1 persistence/publish helpers under the hood
195198

196199
Important nuance:
197200

198-
Wire currently calls this path internally. So v1 is both:
199-
200-
- a bypass path when called directly
201-
- the current underlying ingest implementation used by Wire
201+
v1 is no longer a true producer-side bypass path, but it remains an implementation dependency underneath Wire.
202202

203203
### 3. OpenClaw / agent skill package
204204

@@ -252,20 +252,23 @@ Current state:
252252
- `indexer_bluesky_wire_submission`
253253
- preserves safe rollback via legacy mode
254254

255-
### 6. Report processor direct submit + raw publish
255+
### 6. Report processor match flow (migrated)
256256

257257
Files:
258258

259259
- `report-processor/handlers/handlers.go`
260260

261-
Why it bypasses Wire:
261+
Current state:
262+
263+
- `report-processor` now submits newly created reports through Wire by default
264+
- it uses a dedicated internal Wire fetcher identity and stable `source_id`
265+
- it receives lane assignment and receipt semantics through Wire
266+
- it still emits downstream `report.raw` follow-on events in its own processing flow where appropriate
262267

263-
- submits to another report-creation endpoint directly
264-
- publishes `report.raw` directly
265-
- no agent identity
266-
- no Wire receipt
267-
- no Wire lane assignment
268-
- no Wire reputation or promotion path
268+
Why it still matters:
269+
270+
- this is no longer an ingest bypass
271+
- it is now a Wire-native internal producer, but it still participates in downstream event publication outside the receipt layer
269272

270273
### 7. Internal admin promotion path
271274

@@ -286,28 +289,9 @@ Why it bypasses Wire:
286289
- `news-indexer-bluesky/src/bin/submitter_bluesky.rs` -> Wire-native by default
287290
- `cli/cleanapp/*` machine submission flows -> Wire-native by default
288291
- `openclaw/cleanapp_ingest_skill/*` -> Wire-native
292+
- `report-processor/handlers/handlers.go` -> Wire-native by default for report creation
289293

290-
### Priority 1: Report processor direct path
291-
292-
Files:
293-
294-
- `report-processor/handlers/handlers.go`
295-
296-
Why first now:
297-
298-
- this is the highest-value remaining machine-originated bypass
299-
- it creates reports and publishes `report.raw` directly
300-
- it is where provenance and lane assignment still disappear entirely
301-
302-
What it should gain:
303-
304-
- stable source identity
305-
- Wire receipts
306-
- lane assignment
307-
- reputation tracking
308-
- eventual reward/promotion eligibility
309-
310-
### Priority 2: Legacy v3 machine ingest callers
294+
### Priority 1: Legacy v3 machine ingest callers
311295

312296
Files:
313297

@@ -322,23 +306,23 @@ Why second now:
322306
- they still do not receive Wire responses directly
323307
- they are the next obvious population to either wrap or migrate explicitly
324308

325-
### Priority 3: Direct v1 fetcher ingest callers
309+
### Priority 2: Direct v1 fetcher ingest callers
326310

327311
Files:
328312

329313
- `report-listener/handlers/ingest_v1.go`
330314
- any producers still posting to `/v1/reports:bulkIngest`
331315

332-
Why third now:
316+
Why second now:
333317

334318
- Wire still uses v1 internally, so this cannot be deleted yet
335-
- but direct external use of v1 still bypasses Wire receipts and reputation semantics
319+
- direct external use of v1 now gains Wire semantics internally, but still keeps a legacy response contract
336320

337321
What it should gain:
338322

339323
- eventual collapse behind a pure Wire ingest core once Wire no longer delegates to v1
340324

341-
### Priority 4: Internal admin promotion path
325+
### Priority 3: Internal admin promotion path
342326

343327
Files:
344328

@@ -358,30 +342,32 @@ Current state after migration PRs:
358342
- `news-indexer-bluesky`
359343
- `@cleanapp/cli`
360344
- `openclaw/cleanapp_ingest_skill`
361-
- legacy `/api/v3/reports/bulk_ingest` now mirrors new ingests into Wire submission/receipt records for provenance, without changing its legacy response contract.
362-
- the largest remaining bypass is `report-processor`.
345+
- `report-processor`
346+
- direct `/v1/reports:bulkIngest` now translates submissions into Wire semantics internally while preserving its legacy response contract
347+
- legacy `/api/v3/reports/bulk_ingest` now mirrors new ingests into Wire submission/receipt records for provenance, without changing its legacy response contract
348+
- the largest remaining compatibility gap is legacy `/api/v3` and `/api/v4` machine-ingest callers
363349

364350
Recommended migration order:
365351

366-
1. `report-processor` -> design an internal Wire adapter and migrate last
367-
2. remaining direct `/api/v3/reports/bulk_ingest` callers -> migrate explicitly
368-
3. remaining direct `/v1/reports:bulkIngest` callers -> migrate once Wire no longer depends on v1 internally
352+
1. remaining direct `/api/v3/reports/bulk_ingest` and `/api/v4/reports/bulk_ingest` callers -> migrate explicitly
353+
2. remaining direct `/v1/reports:bulkIngest` callers -> keep compatible for now, then collapse once Wire no longer depends on v1 internally
354+
3. internal admin/moderation paths -> optionally emit Wire-compatible moderation/provenance events
369355

370356
Migration policy recommendation:
371357

372358
- Do not delete v1 or v3 ingest immediately.
373-
- First migrate remaining callers.
359+
- First migrate remaining legacy callers.
374360
- Keep the legacy v3 machine route mirrored into Wire for auditability.
375361
- Only delete v1 direct usage once Wire no longer depends on v1 internally.
376362

377363
## Top 5 Production Risks
378364

379-
### 1. Wire is still not the sole canonical machine-ingest path
365+
### 1. Wire is still not the sole external machine-ingest contract
380366

381367
Risk:
382368

383-
- reputation, lane, receipt, and provenance behavior will remain fragmented
384-
- future policies can silently apply only to part of machine traffic
369+
- external callers can still remain on legacy response contracts
370+
- reputation, lane, receipt, and provenance behavior can remain partially fragmented at the API boundary
385371

386372
### 2. Wire still depends on v1 ingest internals
387373

@@ -406,33 +392,21 @@ Risk:
406392
- reward/economics cannot yet be trusted for production incentives
407393
- corroboration vs duplicate distinction is still absent
408394

409-
### 5. Compatibility mirroring is one-way
395+
### 5. Compatibility layers still hide migration debt
410396

411397
Risk:
412398

413-
- legacy `/api/v3/reports/bulk_ingest` callers now create Wire provenance records internally
414-
- but they still do not receive Wire receipt semantics directly
399+
- legacy `/api/v3` and `/v1` callers now create or translate into Wire provenance internally
400+
- but they still do not uniformly receive Wire-native receipt/status semantics directly
415401
- this can hide migration debt if not tracked explicitly
416402

417403
## Next 3 Smallest Production-Safe PRs
418404

419-
### PR 1: Migrate report-processor through an internal Wire adapter
420-
421-
Scope:
422-
423-
- replace direct report creation + `report.raw` publish path with a Wire-aware internal submission path
424-
- preserve existing behavior while gaining source identity and receipts
425-
426-
Why this is safe:
427-
428-
- one contained internal producer
429-
- biggest remaining provenance gap
430-
431-
### PR 2: Add a first-class migration map for remaining legacy callers
405+
### PR 1: Add a first-class migration map for remaining legacy callers
432406

433407
Scope:
434408

435-
- enumerate all remaining direct callers of `/api/v3/reports/bulk_ingest` and `/v1/reports:bulkIngest`
409+
- enumerate all remaining direct callers of `/api/v3/reports/bulk_ingest`, `/api/v4/reports/bulk_ingest`, and `/v1/reports:bulkIngest`
436410
- assign each to:
437411
- migrate
438412
- wrap
@@ -443,7 +417,7 @@ Why this is safe:
443417
- no runtime behavior change
444418
- reduces hidden bypass risk
445419

446-
### PR 3: Decouple Wire from direct v1 ingest dependency
420+
### PR 2: Decouple Wire from direct v1 ingest dependency
447421

448422
Scope:
449423

@@ -454,6 +428,18 @@ Why this is safe:
454428

455429
- this is the architectural step that finally makes Wire canonical in practice, not just in producer routing
456430

431+
### PR 3: Add optional Wire-native receipt/status metadata to legacy compatibility responses
432+
433+
Scope:
434+
435+
- enrich legacy `/api/v3` and `/v1` compatibility responses with optional receipt/status metadata where it does not break existing callers
436+
- make migration progress visible to integrators without deleting old routes yet
437+
438+
Why this is safe:
439+
440+
- incremental compatibility improvement
441+
- reduces silent dependence on legacy-only semantics
442+
457443
## Recommended Canonical Direction
458444

459445
If CleanApp Wire is intended to become the canonical ingestion layer for all machine-originated and machine-assisted traffic, the architectural end state should be:

0 commit comments

Comments
 (0)