You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cleanapp-wire.md
+67-81Lines changed: 67 additions & 81 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# CleanApp Wire Audit
2
2
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.
4
4
5
5
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`.
6
6
@@ -18,7 +18,7 @@ CleanApp Wire is implemented and live as a public machine-ingest surface on `rep
18
18
- lane assignment
19
19
- transport-level idempotency
20
20
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.
22
22
23
23
Today, Wire is a thin orchestration layer on top of the older fetcher-v1 ingest path:
24
24
@@ -31,8 +31,8 @@ That means the protocol is real, but the system architecture is transitional.
31
31
32
32
The largest implementation gap is architectural, not endpoint-level:
33
33
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
36
36
3. dedupe clustering, rewards, and integrity controls are mostly scaffolding rather than full production behavior
37
37
38
38
## Acceptance Audit Matrix
@@ -60,9 +60,9 @@ The largest implementation gap is architectural, not endpoint-level:
60
60
| 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. |
61
61
| 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. |
62
62
| 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. |
64
64
| 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. |
66
66
67
67
## Current Implementation Reality
68
68
@@ -153,7 +153,7 @@ Files:
153
153
154
154
## Legacy Ingestion Paths That Bypass Wire
155
155
156
-
These still bypass Wire entirelyor 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.
157
157
158
158
### 1. Legacy protected v3/v4 bulk ingest
159
159
@@ -167,12 +167,16 @@ Routes:
167
167
-`POST /api/v3/reports/bulk_ingest`
168
168
-`POST /api/v4/reports/bulk_ingest`
169
169
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
171
175
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
176
180
177
181
### 2. Fetcher v1 ingest surface
178
182
@@ -186,19 +190,15 @@ Route:
186
190
187
191
-`POST /v1/reports:bulkIngest`
188
192
189
-
Why it bypasses Wire:
193
+
Current state:
190
194
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
195
198
196
199
Important nuance:
197
200
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.
202
202
203
203
### 3. OpenClaw / agent skill package
204
204
@@ -252,20 +252,23 @@ Current state:
252
252
-`indexer_bluesky_wire_submission`
253
253
- preserves safe rollback via legacy mode
254
254
255
-
### 6. Report processor direct submit + raw publish
255
+
### 6. Report processor match flow (migrated)
256
256
257
257
Files:
258
258
259
259
-`report-processor/handlers/handlers.go`
260
260
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
262
267
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
269
272
270
273
### 7. Internal admin promotion path
271
274
@@ -286,28 +289,9 @@ Why it bypasses Wire:
286
289
-`news-indexer-bluesky/src/bin/submitter_bluesky.rs` -> Wire-native by default
287
290
-`cli/cleanapp/*` machine submission flows -> Wire-native by default
-`report-processor/handlers/handlers.go` -> Wire-native by default for report creation
289
293
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
311
295
312
296
Files:
313
297
@@ -322,23 +306,23 @@ Why second now:
322
306
- they still do not receive Wire responses directly
323
307
- they are the next obvious population to either wrap or migrate explicitly
324
308
325
-
### Priority 3: Direct v1 fetcher ingest callers
309
+
### Priority 2: Direct v1 fetcher ingest callers
326
310
327
311
Files:
328
312
329
313
-`report-listener/handlers/ingest_v1.go`
330
314
- any producers still posting to `/v1/reports:bulkIngest`
331
315
332
-
Why third now:
316
+
Why second now:
333
317
334
318
- 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
336
320
337
321
What it should gain:
338
322
339
323
- eventual collapse behind a pure Wire ingest core once Wire no longer delegates to v1
340
324
341
-
### Priority 4: Internal admin promotion path
325
+
### Priority 3: Internal admin promotion path
342
326
343
327
Files:
344
328
@@ -358,30 +342,32 @@ Current state after migration PRs:
358
342
-`news-indexer-bluesky`
359
343
-`@cleanapp/cli`
360
344
-`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
363
349
364
350
Recommended migration order:
365
351
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
- 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
+
457
443
## Recommended Canonical Direction
458
444
459
445
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