Skip to content

feat(data-quality): define bounded W65 evaluator contracts - #243

Merged
akhiabanchian merged 1 commit into
mainfrom
w65-bounded-evaluator-contracts
Sep 28, 2026
Merged

akhiabanchian merged 1 commit into
mainfrom
w65-bounded-evaluator-contracts

Conversation

@ammarheidari

@ammarheidari ammarheidari commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Authority

W65 #214 Slice 1 is complete and protected-main verified. Slice 2 bounded evaluator/progress contracts are admitted.

Scope

  • bounded per-cycle evaluator budget reusing existing record-port hard ceilings;
  • evaluator input receives an already authorized finite record batch and never owns Kafka consumer-group state;
  • record cardinality is rejected before enumeration/copying;
  • raw key/value/header bytes are counted against a hard per-cycle byte budget;
  • offsets must be unique, strictly increasing and inside the admitted range;
  • durable progress stores only policy/resource/window/offset/count/state metadata;
  • durable counts are bounded by hard rate × exact evaluation window;
  • evaluator result remains aggregate evidence + progress.

Safety

  • no hidden Kafka consumer ownership;
  • no consumer-group offset commit;
  • no arbitrary code predicates;
  • no durable raw key/value/header payload;
  • no unbounded record/header list or byte budget;
  • cancellation/partial outcomes remain explicit.

Exact head: a0154b8ff3d2421728d63488ee239c1d7233ba01.

Canonical evaluator reconciliation

  • protected-main parent: c27ae8dcec597bfd20f406fd50e4bbc2bc8d0193;
  • canonical exact head: 3d2989baef28bc715d29ca72b86baf51fcc50fa3;
  • one DCO-signed commit;
  • record/header cardinality is bounded before enumeration;
  • offsets are unique/strictly increasing and inside the admitted range;
  • raw key/value/header bytes are bounded;
  • progress is metadata-only and bounded by offset/rate/window invariants;
  • result rejects Evidence/Progress identity/count/state mismatches;
  • fresh exact-head CI, CODEOWNER approval and Codex review required.

Canonical exact-head reconciliation

  • protected-main parent: c27ae8dcec597bfd20f406fd50e4bbc2bc8d0193;
  • exact head: 8d95748207ba4828c25e4435d075d3fbfb9ef3fe;
  • one DCO-signed commit;
  • all prior incremental remediation is included;
  • fresh exact-head CI, CODEOWNER approval and Codex review are required before merge.

Final canonical evaluator gate

  • protected-main parent: c27ae8dcec597bfd20f406fd50e4bbc2bc8d0193;
  • canonical exact head: 46bbfb2399e38318af118b14024dde7eac029c78;
  • one DCO-signed commit;
  • bounded indexed materialization replaces caller enumeration;
  • key/value/header buffers and header collections are snapshotted;
  • complete progress requires cursor at range end;
  • evaluated records cannot exceed cursor-consumed offsets;
  • Unknown/Unavailable progress cannot claim evaluated counters;
  • Evidence/Progress identity, counts, state and window must agree;
  • fresh exact-head CI, CODEOWNER approval and Codex review required.

Protected-main resynchronization

  • parent/protected main: 4a4ec6302b4209f25b7456f95d3687d32ff6b134;
  • exact head: 750e38730b4bd34c4fb198743923c4528b2672ab;
  • one DCO-signed commit;
  • immutable bounded input snapshot and progress cursor/counter invariants retained unchanged;
  • fresh exact-head CI, CODEOWNER approval and Codex review required.

Final exact-head reconciliation

  • protected-main parent: 4a4ec6302b4209f25b7456f95d3687d32ff6b134;
  • exact head: a0154b8ff3d2421728d63488ee239c1d7233ba01;
  • one DCO-signed commit;
  • outer record count and per-record header count are captured once after admission and reused for allocation/iteration;
  • payload/header data is snapshotted from caller-owned mutable buffers;
  • progress counters cannot outrun the consumed cursor;
  • zero evaluated records imply zero evaluated bytes;
  • Unknown/Unavailable progress cannot claim evaluated counters;
  • Complete progress requires cursor at range end;
  • fresh exact-head CI, CODEOWNER approval and Codex review required.

Copy link
Copy Markdown
Contributor Author

@codex review

Please review exact W65 Slice 2 head 42bb25660ae4a92da82555d17c1dbaffc4fe3522, especially pre-enumeration cardinality, byte/offset bounds and metadata-only durable progress.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 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-28T19:10:41.949817Z a0154b8 Manual request
ℹ️ 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.

@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: 42bb25660a

ℹ️ 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".

Comment thread src/backend/Kafdeck.Core/Records/DataQualityEvaluationContracts.cs Outdated
Comment thread src/backend/Kafdeck.Core/Records/DataQualityEvaluationContracts.cs
Comment thread src/backend/Kafdeck.Core/Records/DataQualityEvaluationContracts.cs
akhiabanchian
akhiabanchian previously approved these changes Sep 28, 2026
@ammarheidari
ammarheidari force-pushed the w65-bounded-evaluator-contracts branch from fc36875 to 3d2989b Compare September 28, 2026 18:34

Copy link
Copy Markdown
Contributor Author

@codex review

Please review canonical exact W65 Slice 2 head 3d2989baef28bc715d29ca72b86baf51fcc50fa3, especially bounded transient input and metadata-only progress consistency.

@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: 3d2989baef

ℹ️ 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".

Comment thread src/backend/Kafdeck.Core/Records/DataQualityEvaluationContracts.cs
Comment thread src/backend/Kafdeck.Core/Records/DataQualityEvaluationContracts.cs
@ammarheidari
ammarheidari force-pushed the w65-bounded-evaluator-contracts branch 2 times, most recently from 8d95748 to 46bbfb2 Compare September 28, 2026 18:56

Copy link
Copy Markdown
Contributor Author

@codex review

Please review canonical exact W65 Slice 2 head 46bbfb2399e38318af118b14024dde7eac029c78, focusing on immutable bounded input snapshots and durable progress cursor/counter invariants.

akhiabanchian
akhiabanchian previously approved these changes Sep 28, 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: 46bbfb2399

ℹ️ 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".

Comment thread src/backend/Kafdeck.Core/Records/DataQualityEvaluationContracts.cs Outdated
Comment thread src/backend/Kafdeck.Core/Records/DataQualityEvaluationContracts.cs Outdated
Comment thread src/backend/Kafdeck.Core/Records/DataQualityEvaluationContracts.cs
@ammarheidari
ammarheidari force-pushed the w65-bounded-evaluator-contracts branch from 46bbfb2 to 750e387 Compare September 28, 2026 19:00

Copy link
Copy Markdown
Contributor Author

@codex review

Please review resynchronized exact W65 Slice 2 head 750e38730b4bd34c4fb198743923c4528b2672ab on protected-main 4a4ec6302b4209f25b7456f95d3687d32ff6b134.

Refs #214

Signed-off-by: Ammar Heidari <ammar@arad-itc.org>
@ammarheidari
ammarheidari force-pushed the w65-bounded-evaluator-contracts branch from 9b9517d to a0154b8 Compare September 28, 2026 19:02

Copy link
Copy Markdown
Contributor Author

@codex review

Please review final exact W65 Slice 2 head a0154b8ff3d2421728d63488ee239c1d7233ba01, especially count TOCTOU, immutable snapshots and progress cursor/counter invariants.

Copy link
Copy Markdown
Contributor Author

@codex review

Re-review exact canonical head a0154b8ff3d2421728d63488ee239c1d7233ba01. Previous findings are remediated; review the current head only.

Copy link
Copy Markdown
Contributor Author

@codex review

Final gate request: review exact head a0154b8ff3d2421728d63488ee239c1d7233ba01 only. CI is green and all prior findings are remediated.

@akhiabanchian
akhiabanchian merged commit e1abda3 into main Sep 28, 2026
8 checks passed
@akhiabanchian
akhiabanchian deleted the w65-bounded-evaluator-contracts branch September 28, 2026 19:08

@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: a0154b8ff3

ℹ️ 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".

Comment on lines +364 to +367
outcome ==
DataQualityEvaluationOutcome.Complete &&
nextOffset !=
endOffsetExclusive ||

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 Reject completion with unavailable evidence

When an evaluation cannot obtain evidence, Outcome = Complete, EvidenceState = Unavailable (or Unknown), zero counters, and NextOffset = endOffsetExclusive passes these checks and can be wrapped in a valid DataQualityEvaluationResult. Persisting that terminal checkpoint can permanently skip an unavailable window instead of retrying or surfacing SourceUnavailable; require completed progress to carry evidence that supports completion.

Useful? React with 👍 / 👎.

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.

2 participants