activity-core/src/activity_core
tegwick a70c00a789 feat(ACTIVITY-WP-0016-T03): resilient per-item report recovery with quarantine lane
When the whole-document parse + one retry still fail, report instructions now run
_resilient_report before the total-loss path. A brace/quote-aware scanner
(_extract_object_spans) recovers each recommendation object whether pretty-printed
across many lines or NDJSON one-per-line; a truncated tail gets a best-effort
_try_repair; _partition_items validates each recovered object against the T02 item
schema. Valid items survive (output_validated=True, partial=True), malformed/
over-maxItems items are quarantined with provenance (index, error, raw, reason),
capped at 20. Error locality now matches the unit of work: one bad item costs one
item, not the whole report.

Verified against the real 06-26 shape: 7 valid recommendations + a truncated tail
now recovers all 7 and quarantines the broken tail (previously the whole run was
discarded). Happy-path maxItems top-N enforcement is deferred to T04 (count caps).
Full suite: 215 passed, 1 skipped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 17:56:28 +02:00
..
context_resolvers feat(STATE-WP-0064): wire consistency_sweep_remote_all state-hub query 2026-06-21 20:19:22 +02:00
rules feat(ACTIVITY-WP-0016-T03): resilient per-item report recovery with quarantine lane 2026-06-26 17:56:28 +02:00
__init__.py Add project scaffold: contracts, schemas, docker-compose, workplans 2026-03-04 22:45:40 +01:00
activities.py Add reuse-surface report gaps resolver 2026-06-18 17:58:00 +02:00
api.py Add admin sync hot reload path 2026-06-19 01:54:13 +02:00
db.py feat(db): init Alembic (async) + SQLAlchemy declarative base — T08 2026-03-26 21:45:40 +00:00
definition_parser.py feat(WP-0003b): parser, workflow wiring, triggers, webhooks 2026-05-14 23:02:33 +02:00
event_router.py feat(WP-0004): railiance deployment & service ops 2026-05-15 00:04:39 +02:00
event_type_registry.py Deploy activity-core on railiance01 2026-05-22 13:49:46 +02:00
issue_sink.py fix(issue-sink): stringify triggering_event_id before JSON encode 2026-06-19 00:15:03 +02:00
llm_client.py Pass instruction depth config to llm-connect 2026-05-19 20:55:35 +02:00
models.py feat(ACTIVITY-WP-0014): explicit run-miss recovery policies (T02, T04) 2026-06-23 14:15:45 +02:00
ops_evidence_sinks.py feat(ACTIVITY-WP-0014): idempotency-keyed State Hub writes (T05, in-repo part) 2026-06-23 21:38:46 +02:00
orm.py feat(WP-0003b): parser, workflow wiring, triggers, webhooks 2026-05-14 23:02:33 +02:00
report_sinks.py feat(ACTIVITY-WP-0014): idempotency-keyed State Hub writes (T05, in-repo part) 2026-06-23 21:38:46 +02:00
schedule_health.py feat(ACTIVITY-WP-0014): idempotency-keyed State Hub writes (T05, in-repo part) 2026-06-23 21:38:46 +02:00
schedule_manager.py feat(ACTIVITY-WP-0014): explicit run-miss recovery policies (T02, T04) 2026-06-23 14:15:45 +02:00
seed.py feat(db): add dev seed script for ActivityDefinition — T12 2026-03-26 21:53:59 +00:00
state_hub_write.py feat(ACTIVITY-WP-0014): idempotency-keyed State Hub writes (T05, in-repo part) 2026-06-23 21:38:46 +02:00
sync_activity_definitions.py Fix ActivityDefinition sync for daily triage canary 2026-05-19 20:13:23 +02:00
sync_schedules.py Add admin sync hot reload path 2026-06-19 01:54:13 +02:00
sync_service.py Add admin sync hot reload path 2026-06-19 01:54:13 +02:00
template_engine.py feat(activities): resolve_context stub + evaluate_templates — T15/T16 2026-03-26 22:06:09 +00:00
webhook_receiver.py feat(WP-0003b): parser, workflow wiring, triggers, webhooks 2026-05-14 23:02:33 +02:00
worker.py Add admin sync hot reload path 2026-06-19 01:54:13 +02:00
workflows.py Align activity-core scope boundaries 2026-06-18 15:11:48 +02:00