chore: add real content that was sitting untracked

Surfaced by today's untracked-files audit. None of these are accidents —
multiple are referenced by name in CLAUDE.md and memory files but were
never added.

Categories:
- docs/PHASE_AUDIT_GUIDE.md (106 LOC) — Claude Code phase audit guidance
- ops/systemd/lakehouse-langfuse-bridge.service — Langfuse bridge unit
- package.json — top-level npm manifest
- scripts/e2e_pipeline_check.sh + production_smoke.sh — real test scripts
- reports/kimi/audit-last-week*.md — the "Two reports live" CLAUDE.md cites
- tests/multi-agent/scenarios/ — 44 staffing scenarios (cutover decision A)
- tests/multi-agent/playbooks/ — 102 playbook records
- tests/battery/, tests/agent_test/PRD.md, tests/real-world/* — real tests
- sidecar/sidecar/{lab_ui,pipeline_lab}.py — 888 LOC dev-only UIs that
  remain in service post-sidecar-drop (commit ba928b1 explicitly kept them)

Sensitivity check: scenarios use synthetic company names ("Heritage Foods",
"Cornerstone Fabrication"); audit reports describe code findings only;
no PII or secrets surfaced.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
root
2026-05-02 22:22:10 -05:00
co-authored by Claude Opus 4.7
parent 6e34ef7baf
commit 41b0a99ed2
788 changed files with 107142 additions and 0 deletions
@@ -0,0 +1,2 @@
{"after_event":"12:15","event_kind":"expansion","ok":true,"model":"gpt-oss:120b","duration_secs":4.854,"risk":"JSON formatting error in tool calls","hint":"Validate JSON syntax of plan before execution; ensure brackets closed and quotes escaped for role, city, state fields."}
{"after_event":"15:45","event_kind":"misplacement","ok":true,"model":"gpt-oss:120b","duration_secs":4.347,"risk":"JSON format errors halting workflow","hint":"Validate JSON schema and include a Toledo, OH Warehouse Associate candidate before next tool call."}
@@ -0,0 +1 @@
# Client emails — Riverfront Steel, 2026-04-21
@@ -0,0 +1,5 @@
# Cross-day lesson — Riverfront Steel, 2026-04-21
_Generated by `gpt-oss:120b` in 7.7s. Based on 5 events + 2 mid-day checkpoints._
Before each batch, generate the JSON payload for every role‑city‑state request, run it through a JSON linter, and verify that all brackets are closed and the role, city, and state values are properly quoted. Keep a pre‑cached list of at least one qualified candidate for each common position (Warehouse Associate, Machine Operator, Forklift Operator, Loader) in Toledo, OH, and insert that candidate into the payload before calling the tool. After building the plan, re‑validate the entire JSON schema; if any formatting error is detected, correct it immediately rather than proceeding to the next event. This ensures the pool isn’t empty and prevents JSON‑format failures that halt the workflow.
@@ -0,0 +1,80 @@
[
{
"date": "2026-04-21",
"client": "Riverfront Steel",
"cities": "Toledo",
"states": "OH",
"events_total": 5,
"events_ok": 0,
"checkpoint_count": 2,
"model": "gpt-oss:20b",
"cloud": false,
"lesson": "** \nBefore any tool call, run the JSON payload through a linter and escape all single quotes or use parameterized queries to avoid syntax errors. Validate the entire JSON structure—especially braces and commas—before sending it to the executor. Pre‑fetch the required pool data for each role so that the `pool` field is populated, preventing the “pool=?” placeholder that caused the failures. This will eliminate the repeated JSON syntax failures seen in the Forklift Operator expansion and Warehouse Associate misplacement.",
"checkpoints": [
{
"after": "12:15",
"risk": "JSON syntax error in tool calls",
"hint": "For the next Forklift Operator expansion, escape single quotes in SQL query or use a parameterized query; validate JSON with a linter before execution."
},
{
"after": "15:45",
"risk": "Warehouse Associate JSON error",
"hint": "Escape quotes in SQL query; close JSON braces before sending to executor."
}
],
"created_at": "2026-04-21T00:43:44.018Z",
"file": "2026-04-21_Riverfront_Steel_1776732224018.json"
},
{
"date": "2026-04-21",
"client": "Riverfront Steel",
"cities": "Toledo",
"states": "OH",
"events_total": 5,
"events_ok": 1,
"checkpoint_count": 2,
"model": "gpt-oss:20b",
"cloud": false,
"lesson": "** \nBefore any baseline, recurring, or emergency fill, query the pool size and turn count; missing data causes the job to fail. Replicate the expansion logic that pulls pool and turns for all event types. If the GPT‑OSS model is unavailable, switch to a local fallback or log a warning instead of returning empty risk text. Validate that gaps are accounted for before committing the fill to avoid single‑gap failures.",
"checkpoints": [
{
"after": "12:15",
"risk": "generate returned empty text from gpt-oss:20b: {\"text\":\"\",\"model\":\"gpt-oss:20b\",",
"hint": "(T3 unavailable)"
},
{
"after": "15:45",
"risk": "generate returned empty text from gpt-oss:20b: {\"text\":\"\",\"model\":\"gpt-oss:20b\",",
"hint": "(T3 unavailable)"
}
],
"created_at": "2026-04-21T00:34:20.521Z",
"file": "2026-04-21_Riverfront_Steel_1776731660521.json"
},
{
"date": "2026-04-21",
"client": "Riverfront Steel",
"cities": "Toledo",
"states": "OH",
"events_total": 5,
"events_ok": 0,
"checkpoint_count": 2,
"model": "gpt-oss:20b",
"cloud": false,
"lesson": "** \nBefore any event, pre‑fetch the full pool roster and skill certification data for Toledo, OH; the missing pool data caused every shift to fail. Verify forklift operator certifications and tool compatibility ahead of time, as the misplacement risk highlighted a skill gap. Ensure the risk‑generation model (gpt‑oss:20b) is online or have a manual fallback; the empty response after the expansion shows a T3 unavailability that halted risk assessment. Apply these checks for baseline, recurring, expansion, emergency, and misplacement events to avoid the single‑gap failure pattern.",
"checkpoints": [
{
"after": "12:15",
"risk": "generate returned empty text from gpt-oss:20b: {\"text\":\"\",\"model\":\"gpt-oss:20b\",",
"hint": "(T3 unavailable)"
},
{
"after": "15:45",
"risk": "Forklift Operator skill gap",
"hint": "Verify forklift operator certification and tool compatibility for Toledo shift."
}
],
"created_at": "2026-04-21T00:39:54.327Z",
"file": "2026-04-21_Riverfront_Steel_1776731994327.json"
}
]
@@ -0,0 +1,57 @@
# Scenario retrospective — Riverfront Steel, 2026-04-21
Executor: `mistral:latest` Reviewer: `qwen2.5:latest` Draft: `qwen2.5:latest` Overview(T3): `gpt-oss:120b (cloud)`
Prior lessons loaded into executor context: **3** (from 2026-04-21, 2026-04-21, 2026-04-21)
## Events
| At | Kind | Role / Count | Pool | Fills | Turns | Dur(s) | Cites | Gaps |
|---|---|---|---|---|---|---|---|---|
| 08:00 | baseline_fill | Warehouse Associate × 3 | - | ✗ 0 | 0 | 9.3 | 0 | 1 |
| 10:30 | recurring | Machine Operator × 2 | - | ✗ 0 | 0 | 7.4 | 0 | 1 |
| 12:15 | expansion | Forklift Operator × 5 | - | ✗ 0 | 0 | 28.8 | 0 | 1 |
| 14:00 | emergency | Loader × 4 | - | ✗ 0 | 0 | 3.1 | 0 | 1 |
| 15:45 | misplacement | Warehouse Associate × 1 | - | ✗ 0 | 0 | 7.4 | 0 | 1 |
## Final roster
| Worker | Booked | Role | City, ST | Status |
|---|---|---|---|---|
## Gap signals
### drift_or_tool
- **08:00** — invalid JSON from reviewer: JSON Parse error: Unrecognized token '|' | raw: {"kind":"critique","verdict":"continue" | "drift","notes":"Ensure the proposal includes exactly 3 Warehouse Associates from Toledo, OH, and verify at least one candidate through SQL."}
- **10:30** — invalid JSON from reviewer: JSON Parse error: Unrecognized token '|' | raw: {"kind":"critique","verdict":"continue" | "drift" | "approve_done","notes":"Ensure the SQL verification step includes at least one of the proposed Machine Operators from Toledo, OH with the role 'Machine Operator', and confirm exactly 2 fills are proposed."}
- **12:15** — invalid JSON from executor: JSON Parse error: Expected ']' | raw: {"kind":"plan","steps":["1. TOOL_CALL sql({'query':"SELECT COUNT(*) FROM workers_500k WHERE role = 'Forklift Operator' AND city = 'Toledo' AND state = 'OH' AND CAST(availability AS DOUBLE) > 0.5 AND CAST(reliability AS DOUBLE) > 0.75"})","2. TOOL_RESULT sql: pool_size=x, where x is the number of wor
- **14:00** — invalid JSON from executor: JSON Parse error: Invalid escape character ' | raw: {"kind":"plan","steps":["Check JSON payload structure and escape all single quotes",
"hybrid_search(sql_filter: 'role = \'Loader\' AND city = \'Toledo\' AND state = \'OH\' AND CAST(availability AS DOUBLE) > 0.7', question:'emergency Loader Toledo', index_name:'workers_500k
- **15:45** — invalid JSON from reviewer: JSON Parse error: Unrecognized token '|' | raw: {"kind":"critique","verdict":"continue" | "drift" | "approve_done","notes":"Ensure the tool calls use parameterized queries and validate the JSON structure. Verify at least one candidate from Toledo, OH with the role 'Warehouse Associate'."}
### write_through_audit
- _post-run_ — playbook_memory has 1214 entries (ran 5 events, expected ≥ 0 new entries from this run)
## Workers touched across the week
0 distinct workers made it through to a decision. Every one is accounted for below — no-shows flagged, rebookings noted, everyone visible.
| Worker ID | Name | Events | Outcome |
|---|---|---|---|
## Discovered patterns (meta-index)
What the system identified across semantically-similar past fills as each event ran:
- **08:00 baseline_fill** (Warehouse Associate): —
- **10:30 recurring** (Machine Operator): —
- **12:15 expansion** (Forklift Operator): —
- **14:00 emergency** (Loader): —
- **15:45 misplacement** (Warehouse Associate): —
## Narrative
- 0/5 events reached consensus.
- Final roster: 0 bookings across 0 distinct workers.
- Workers touched (booked, failed, or otherwise decided): 0.
- Playbook citations across the day: 0 (proof the feedback loop fired across events).
- Dropped events: 08:00 baseline_fill, 10:30 recurring, 12:15 expansion, 14:00 emergency, 15:45 misplacement.
@@ -0,0 +1,104 @@
[
{
"event": {
"kind": "baseline_fill",
"at": "08:00",
"role": "Warehouse Associate",
"count": 3,
"city": "Toledo",
"state": "OH",
"shift_start": "08:00 AM",
"scenario_note": "Regular Monday morning shift, 8-hour."
},
"ok": false,
"fills": [],
"turns": 0,
"duration_secs": 9.267,
"error": "invalid JSON from reviewer: JSON Parse error: Unrecognized token '|' | raw: {\"kind\":\"critique\",\"verdict\":\"continue\" | \"drift\",\"notes\":\"Ensure the proposal includes exactly 3 Warehouse Associates from Toledo, OH, and verify at least one candidate through SQL.\"}",
"gap_signals": [
"drift_or_tool: invalid JSON from reviewer: JSON Parse error: Unrecognized token '|' | raw: {\"kind\":\"critique\",\"verdict\":\"continue\" | \"drift\",\"notes\":\"Ensure the proposal includes exactly 3 Warehouse Associates from Toledo, OH, and verify at least one candidate through SQL.\"}"
]
},
{
"event": {
"kind": "recurring",
"at": "10:30",
"role": "Machine Operator",
"count": 2,
"city": "Toledo",
"state": "OH",
"shift_start": "11:00 AM",
"scenario_note": "Recurring Tuesday/Thursday slot — prior workers may still be available."
},
"ok": false,
"fills": [],
"turns": 0,
"duration_secs": 7.422,
"error": "invalid JSON from reviewer: JSON Parse error: Unrecognized token '|' | raw: {\"kind\":\"critique\",\"verdict\":\"continue\" | \"drift\" | \"approve_done\",\"notes\":\"Ensure the SQL verification step includes at least one of the proposed Machine Operators from Toledo, OH with the role 'Machine Operator', and confirm exactly 2 fills are proposed.\"}",
"gap_signals": [
"drift_or_tool: invalid JSON from reviewer: JSON Parse error: Unrecognized token '|' | raw: {\"kind\":\"critique\",\"verdict\":\"continue\" | \"drift\" | \"approve_done\",\"notes\":\"Ensure the SQL verification step includes at least one of the proposed Machine Operators from Toledo, OH with the role 'Machine Operator', and confirm exactly 2 fills are proposed.\"}"
]
},
{
"event": {
"kind": "expansion",
"at": "12:15",
"role": "Forklift Operator",
"count": 5,
"city": "Toledo",
"state": "OH",
"shift_start": "01:00 PM",
"scenario_note": "New warehouse location opening, five-worker team needed."
},
"ok": false,
"fills": [],
"turns": 0,
"duration_secs": 28.782,
"error": "invalid JSON from executor: JSON Parse error: Expected ']' | raw: {\"kind\":\"plan\",\"steps\":[\"1. TOOL_CALL sql({'query':\"SELECT COUNT(*) FROM workers_500k WHERE role = 'Forklift Operator' AND city = 'Toledo' AND state = 'OH' AND CAST(availability AS DOUBLE) > 0.5 AND CAST(reliability AS DOUBLE) > 0.75\"})\",\"2. TOOL_RESULT sql: pool_size=x, where x is the number of wor",
"gap_signals": [
"drift_or_tool: invalid JSON from executor: JSON Parse error: Expected ']' | raw: {\"kind\":\"plan\",\"steps\":[\"1. TOOL_CALL sql({'query':\"SELECT COUNT(*) FROM workers_500k WHERE role = 'Forklift Operator' AND city = 'Toledo' AND state = 'OH' AND CAST(availability AS DOUBLE) > 0.5 AND CAST(reliability AS DOUBLE) > 0.75\"})\",\"2. TOOL_RESULT sql: pool_size=x, where x is the number of wor"
]
},
{
"event": {
"kind": "emergency",
"at": "14:00",
"role": "Loader",
"count": 4,
"city": "Toledo",
"state": "OH",
"shift_start": "04:00 PM same day",
"deadline": "16:00",
"scenario_note": "Walkoff incident — replacement crew needed by 16:00 sharp."
},
"ok": false,
"fills": [],
"turns": 0,
"duration_secs": 3.143,
"error": "invalid JSON from executor: JSON Parse error: Invalid escape character ' | raw: {\"kind\":\"plan\",\"steps\":[\"Check JSON payload structure and escape all single quotes\",\n \"hybrid_search(sql_filter: 'role = \\'Loader\\' AND city = \\'Toledo\\' AND state = \\'OH\\' AND CAST(availability AS DOUBLE) > 0.7', question:'emergency Loader Toledo', index_name:'workers_500k",
"gap_signals": [
"drift_or_tool: invalid JSON from executor: JSON Parse error: Invalid escape character ' | raw: {\"kind\":\"plan\",\"steps\":[\"Check JSON payload structure and escape all single quotes\",\n \"hybrid_search(sql_filter: 'role = \\'Loader\\' AND city = \\'Toledo\\' AND state = \\'OH\\' AND CAST(availability AS DOUBLE) > 0.7', question:'emergency Loader Toledo', index_name:'workers_500k"
]
},
{
"event": {
"kind": "misplacement",
"at": "15:45",
"role": "Warehouse Associate",
"count": 1,
"city": "Toledo",
"state": "OH",
"shift_start": "remainder of 08:00 shift",
"scenario_note": "One worker from the 08:00 fill didn't show; rebuild the gap.",
"replaces_event": "08:00"
},
"ok": false,
"fills": [],
"turns": 0,
"duration_secs": 7.41,
"error": "invalid JSON from reviewer: JSON Parse error: Unrecognized token '|' | raw: {\"kind\":\"critique\",\"verdict\":\"continue\" | \"drift\" | \"approve_done\",\"notes\":\"Ensure the tool calls use parameterized queries and validate the JSON structure. Verify at least one candidate from Toledo, OH with the role 'Warehouse Associate'.\"}",
"gap_signals": [
"drift_or_tool: invalid JSON from reviewer: JSON Parse error: Unrecognized token '|' | raw: {\"kind\":\"critique\",\"verdict\":\"continue\" | \"drift\" | \"approve_done\",\"notes\":\"Ensure the tool calls use parameterized queries and validate the JSON structure. Verify at least one candidate from Toledo, OH with the role 'Warehouse Associate'.\"}"
]
}
]
@@ -0,0 +1 @@
# SMS drafts — Riverfront Steel, 2026-04-21