Skip to content

Fail invalid consensus outcomes per request instead of signing them - #748

Draft
ilija42 wants to merge 1 commit into
mainfrom
fix/consensus-report-validation
Draft

Fail invalid consensus outcomes per request instead of signing them#748
ilija42 wants to merge 1 commit into
mainfrom
fix/consensus-report-validation

Conversation

@ilija42

@ilija42 ilija42 commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

The Reports phase signed outcomes that had an empty payload, an unknown request type, or a zero timestamp. One invalid outcome also stopped the full round and dropped all other requests in the batch.

This change checks each outcome before the plugin signs it. If the check fails, the plugin makes a failure report with the new INVALID_OUTCOME code for that request only. The report count limit now includes oversized reports.

Error observations now add their received_at time to the median timestamp. A new flag on RequestObservation controls this. The plugin uses the new behavior only when all observations for the request set the flag, so a mixed set of nodes makes the same outcome. Simple and Report reject a report that has no payload after the metadata prefix.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-07T19:09:49.172540Z 0bad5f0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ilija42 ilija42 closed this Sep 7, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0bad5f0260

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


// Every observation contributes to the median timestamp, so an outcome that falls back to the caller's default
// after f+1 errors is still stamped with when the DON observed it.
timestamps = append(timestamps, obs.ReceivedAt)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Gate the timestamp change for rolling upgrades

During a rolling upgrade, this unconditional change makes upgraded nodes include error observations in the median timestamp while nodes running the parent revision include only value observations. For requests containing errors—especially f+1 errors followed by a default—the same attributed observations therefore produce different serialized outcomes, and the versions can also disagree later between an epoch-zero success and an invalid-outcome failure report. This can prevent enough matching OCR signatures from being collected or allow the old invalid behavior depending on the participating cohort; negotiate this semantic change through an observation flag, as the adjacent error-handling migrations do.

Useful? React with 👍 / 👎.

@ilija42 ilija42 reopened this Sep 8, 2026
@ilija42
ilija42 force-pushed the fix/consensus-report-validation branch from 0bad5f0 to 640ba85 Compare September 8, 2026 20:25
@ilija42
ilija42 marked this pull request as draft September 8, 2026 20:28
@cl-sonarqube-production

Copy link
Copy Markdown

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