Skip to content

fix(automation): unify fact proposal contracts - #4541

Open
ScriptedAlchemy wants to merge 1 commit into
fix/s2-4514-backlog-prefix-cachefrom
fix/canonical-fact-proposals
Open

ScriptedAlchemy wants to merge 1 commit into
fix/s2-4514-backlog-prefix-cachefrom
fix/canonical-fact-proposals

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Merge #4478 first, followed by #4526, #4510, #4524, #4489, #4485, #4527, #4528, #4530, #4531, #4529, #4534, and #4541.

This PR is number 13 of 13, based on #4534.

Use merge commits. After merging a parent PR, change its child's base to master before merging the child. Auto-merge is disabled.

Problem

Standalone session reflection, combined review, and runtime validation described the same fact proposal differently. In particular, combined review advertised string store IDs and numeric-only trust while runtime required numeric IDs and also accepted normalized trust labels. This made valid proposals depend on which route produced them.

Changes

  • Add one typed fact proposal and exclusive source-reference contract in tracedecay-contracts. Generate its inline JSON Schema with the existing Schemars dependency and embed it in both response envelopes.
  • Decode each untrusted fact once before the existing semantic validation. Preserve the original malformed item in quarantine and repair evidence, so one malformed sibling does not discard valid proposals.
  • Preserve released trust-label normalization and omitted tags/entities. Numeric store IDs must fit signed 64-bit bounds; integral JSON numbers such as 7.0 normalize to 7, while strings, fractions, and overflow are rejected.
  • Keep content/evidence limits, citation membership, privacy, deduplication, trust policy, and apply authority in their existing runtime owners. Standalone partial application and combined-review atomic failure behavior remain covered.
  • Point task prose at the generated response schema and bump the input identities to session_reflector:v3 and combined_review:v4.

No dependency changes or public retained-evidence schema changes are needed. The accepted-item handoff remains the separate scope of #4430.

Validation

Cargo validation used the pinned nightly and retained production features, debug assertions, and overflow checks. All selected runs had nonzero test counts and no ignored or failed tests.

  • 52 library tests passed: the full automation library suite (39), canonical proposal contract tests (5), and focused runtime validation/effect/replay tests (8).
  • 9 integration tests passed: both full generated schemas versus the shared decoder; repair through both actual runners with canonical memory reads and receipts; standalone partial application and quarantine; combined-review atomic success and failed-repair no-write behavior; learned-skill repair and exhaustion; deterministic combined input hashing.
  • Pinned rustfmt, git diff --check, commitlint, and the existing generated BUILD-file check passed (61 generated files current).

Native-storage fixtures ran in isolated temporary tmpfs directories and were removed afterward. No paid model calls were used.

The 61 passing tests cover this change on parent ea18e44c202fcb1b0bf82156bd9f8fafd65b2502 (the then-current #4529 head). The ten changed files are byte-identical after rebasing onto #4534 at b0a1c65b3e71f5ccbddfd3e25a39f4db2179056b. The intervening upstream changes are scheduler cancellation classification, structural-ID privacy handling, and status/doctor backlog-prefix memoization; none edits the fact-proposal contract or runner changes here.

Final rebuild limitation: a recheck after the upstream privacy update rebuilt missing cached dependencies and was killed while compiling asupersync under the 8 GiB container limit. It did not reach test execution. The 61 earlier passing tests are not presented as a run on the final stack parent. The last parent (#4534) was separately inspected: its single-file backlog-health cache change is outside these automation test paths.

The earlier successful production-feature build used package-scoped compiler settings (hint-mostly-unused, fewer LLVM names, and one frontend/backend job) to fit compilation into this container. These are local settings, not repository changes; they were also present in the final unsuccessful rebuild.

Closes #4431

@changeset-bot

changeset-bot Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c658246

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

devin-ai-integration[bot]

This comment was marked as resolved.

@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from c6fdef1 to 8dfc5c0 Compare October 25, 2026 10:36
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/canonical-fact-proposals branch from 03c5918 to f1d2754 Compare October 25, 2026 10:36
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from 8c0b813 to 1827cd3 Compare October 25, 2026 11:27
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/canonical-fact-proposals branch from f1d2754 to dec2b59 Compare October 25, 2026 11:28
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from 1827cd3 to 5d0ce78 Compare October 25, 2026 13:27
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/canonical-fact-proposals branch from dec2b59 to bae3e41 Compare October 25, 2026 13:27
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from 800fb2c to 7fe08fa Compare October 25, 2026 19:42
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/canonical-fact-proposals branch 2 times, most recently from 0a88b9c to 702f2bc Compare October 25, 2026 19:43
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from 7fe08fa to 872e5bf Compare October 25, 2026 20:06
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/canonical-fact-proposals branch from 702f2bc to 2ef3e13 Compare October 25, 2026 20:06
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from 4d0e36c to bd30776 Compare October 26, 2026 03:43
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/canonical-fact-proposals branch from 0bbf194 to ef0ef3d Compare October 26, 2026 03:43
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from bd30776 to 0e3998c Compare October 26, 2026 03:51
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/canonical-fact-proposals branch from ef0ef3d to 873386a Compare October 26, 2026 03:51
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from 0e3998c to ebf6fa0 Compare October 26, 2026 03:59
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/canonical-fact-proposals branch from 873386a to 90fef52 Compare October 26, 2026 03:59
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from ebf6fa0 to 09c814a Compare October 26, 2026 05:15
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/canonical-fact-proposals branch from d467596 to d4d1692 Compare October 26, 2026 05:15
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from 09c814a to ea9438a Compare October 26, 2026 05:35
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/canonical-fact-proposals branch from d4d1692 to b8b3425 Compare October 26, 2026 05:35
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/s2-4514-backlog-prefix-cache branch from ea9438a to c90e8f7 Compare October 26, 2026 08:58
Restack unique #4541 onto the rewritten #4534 tip.
@ScriptedAlchemy
ScriptedAlchemy force-pushed the fix/canonical-fact-proposals branch from 8005888 to c658246 Compare October 26, 2026 08:58

This branch has not been deployed

No deployments
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