Skip to content

Retain optional JSON data with decisions and recent verdicts - #50

Merged
asher-aqi merged 5 commits into
mainfrom
feat/decision-data
Nov 14, 2026
Merged

asher-aqi merged 5 commits into
mainfrom
feat/decision-data

Conversation

@asher-aqi

@asher-aqi asher-aqi commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Summary

A custom judge can now attach an optional JSON result to its decision in both runtimes.

Judgment.data -> committed decision -> sink retry or recovery
              -> recent verdict -> next custom judge

The engine owns the prepared result through retries. Sinks and later judges receive detached copies. Omission keeps existing shapes; explicit null and empty values are retained. A skip keeps data in recent context; a wait keeps no final result. Reducer revision advances to 6; package versions are unchanged.

Evidence

  • Before: the native sink and recent history dropped the result. Committed failing tests reproduce it. After: eight focused tests pass in each runtime, including retained-store restart, retry, mutation isolation and invalid JSON.
  • One shared runtime scenario covers wait, retry, logs and recent context in both ports. All 93 earlier scenarios are unchanged.
  • Full TypeScript run: 1,663 passed, two existing Redis skips, and one stale revision assertion. The corrected assertion passed in a 23-test rerun. Python: 507 passed, zero skips, with Redis/Postgres and interoperability enabled. Oracle 128 and benchmark contracts 77 passed; types, lint, build, 44 doc blocks and browser-root checks passed.
  • Independent review found no issues. After including the release baseline, version checks and 63 TypeScript/103 Python checks passed. All owned test stores are stopped.

Merge Danger

Door: Two-way before callers use data. Stores that contain it need compatible readers and writers; older versions do not retain the new field.

Blast Radius: Delivery and recent context. Data uses existing outbox/history storage, so callers should bound its size. Default notices and hosted judge prompts are unchanged. No package publication is included.


Devin Review

A host-produced result must reach the sink unchanged after a failed attempt or runner restart, and remain available as recent context.
Keep a custom judge result with its decision and recent verdict so delivery retries and recovery do not need a host-side cache. Normalize incoming data, detach outgoing copies, and preserve absent fields for existing callers in both runtimes.
Keep the invariant suite pinned to the revision that retains decision data.
Carry the current main version and packaging checks into the decision data branch without changing the feature contract.
Keep the result contract alongside the custom judge API.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@asher-aqi
asher-aqi merged commit 8290805 into main Nov 14, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant