feat: add msglib message source metadata
This commit is contained in:
@@ -2600,17 +2600,55 @@ MsgLib message-table source precheck result:
|
||||
- Return table availability, required/present columns, safe row counts, and source role metadata only.
|
||||
- Do not return `MsgText`, `MessageBody`, `FilePath`, entity values, raw rows, sends, downloads, hooks, injection, or DB writes.
|
||||
|
||||
- [ ] **Step 1: Write failing Go client/sidecar tests for message-source metadata**
|
||||
- [x] **Step 1: Write failing Go client/sidecar tests for message-source metadata**
|
||||
|
||||
Test request/response decoding and bounded metadata shape with a fake sidecar before implementation.
|
||||
Added `TestMessageSourcesPassesConfiguredPathsAndDecodesMetadata`; RED failed with `client.MessageSources undefined`.
|
||||
|
||||
- [ ] **Step 2: Implement sidecar metadata operation**
|
||||
- [x] **Step 2: Implement sidecar metadata operation**
|
||||
|
||||
Expose message-source readiness using existing read-only schema/count helpers and allowlisted table/column maps.
|
||||
Implemented Go `MessageSources(ctx)` plus x86 sidecar op `message_sources`. The op returns metadata-only source/table/role/availability/required/present columns/row counts for allowlisted message-source tables.
|
||||
|
||||
- [ ] **Step 3: Verify default and evidence-backed smokes**
|
||||
- [x] **Step 3: Verify default and evidence-backed smokes**
|
||||
|
||||
Update `scripts\verify-msglib-sidecar.ps1` to assert sanitized message-source metadata when copied DB env is configured, then run the full gate.
|
||||
Updated `scripts\verify-msglib-sidecar.ps1` to call `message_sources` when copied DB env is configured. Verification passed: `git diff --check`, `go test ./...`, default sidecar smoke, evidence-backed sidecar smoke, optional `scripts\verify-msglib-mcp-enrichment.ps1`, and deterministic `scripts\verify-go-mcp.ps1`. Default sidecar smoke returned `message_source_count=0`; evidence-backed smoke returned `message_source_count=6`, `message_body_values_returned=false`, `raw_rows_returned=false`, and `file_paths_returned=false`.
|
||||
|
||||
---
|
||||
|
||||
## Loop C36 Result
|
||||
|
||||
MsgLib message-source metadata sidecar result:
|
||||
|
||||
- Added sidecar op `message_sources` and Go wrapper `MessageSources(ctx)`.
|
||||
- Added fake-sidecar unit coverage for request args and decoded metadata shape.
|
||||
- Evidence-backed sidecar smoke returned six message-source summaries: direct, group, system, group receipt, received-file metadata, and recent conversation index.
|
||||
- Output remains metadata-only: table/column/count summaries, no `MsgText`/`MessageBody` values, no file path values, no raw rows.
|
||||
|
||||
---
|
||||
|
||||
## Loop C37: Bounded DB-backed receive-source design
|
||||
|
||||
**Goal:** Design the smallest safe implementation slice for DB-backed `isphere_receive_messages` using C35 field mapping and C36 `message_sources` readiness metadata.
|
||||
|
||||
**Planned files:**
|
||||
- Modify or create a design note under `docs/source-discovery/`.
|
||||
- Modify matrix/status/plan.
|
||||
- Do not implement body-returning DB listing until the contract and acceptance gate are explicit.
|
||||
|
||||
**Planned behavior:**
|
||||
- Define direct/group source selection, ordering, limit, body-column policy, attachment metadata policy, and fallback behavior versus PacketReader.
|
||||
- Decide whether C38 should add sidecar-level bounded row listing or first add a redacted synthetic DB fixture.
|
||||
|
||||
- [ ] **Step 1: Write bounded DB receive-source contract**
|
||||
|
||||
Define request args, returned fields, limits, and no-output boundaries for DB-backed receive listing.
|
||||
|
||||
- [ ] **Step 2: Choose implementation route**
|
||||
|
||||
Select between sidecar row listing, Go source abstraction first, or synthetic fixture-first tests.
|
||||
|
||||
- [ ] **Step 3: Update next implementation loop**
|
||||
|
||||
Record C37 decision and prepare C38.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user