Skip to content

QRS V4 truth labels and clock consistency - #198

Closed
Pigbibi wants to merge 4 commits into
mainfrom
qsl/qrs-v4-executable-matrix-implementation-20260802
Closed

QRS V4 truth labels and clock consistency#198
Pigbibi wants to merge 4 commits into
mainfrom
qsl/qrs-v4-executable-matrix-implementation-20260802

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • QRS V4 truth-label and timestamp-clock consistency across producer, runtime, schemas, Worker, and executable validation matrix.

Evidence

  • Tests-first RED: reproduced expected semantic failure before implementation (not a tooling failure).
  • Exact matrix: 610/610; schema proofs: 321/321; production-route canaries: 22/22; full Python: 124/124.
  • Canonical semantics: generated/readback timestamps use one UTC reference clock; generated_at <= reference_now + 5m; readback_at is inclusive within reference_now - 7d through reference_now + 5m; optional keyword-only now seam.
  • Independent audit: P1/P2 = 0; no deploy/live/settings side effects.
  • Audit decision SHA-256: 5bcb4aa822bbfb70b528cf8acff6cf99e8614f0be96b2d031c52b380d10f6545
  • Audit readback SHA-256: 42704f7d69a408e0a30c74ee3707792769944e28e47d62e3a8331dd82896e209

Boundary

Merge is not authorized and has not been performed.

Co-Authored-By: Codex <noreply@openai.com>

@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: 41973ff096

ℹ️ 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 python/tests/test_runtime_settings.py
Comment thread python/scripts/build_config.py
Comment thread python/tests/test_runtime_settings.py Outdated
Comment thread web/strategy-switch-console/worker.js Outdated
Comment thread python/scripts/runtime_settings.py Outdated
Comment thread web/strategy-switch-console/worker.js
Co-Authored-By: Codex <noreply@openai.com>

@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: 8675c03e7d

ℹ️ 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 web/strategy-switch-console/worker.js Outdated
Comment thread web/strategy-switch-console/worker.js
Comment thread web/strategy-switch-console/worker.js
Co-Authored-By: Codex <noreply@openai.com>

@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: 37c339f7fa

ℹ️ 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 web/strategy-switch-console/worker.js Outdated
Comment thread web/strategy-switch-console/worker.js Outdated
Comment thread web/strategy-switch-console/worker.js Outdated
Comment thread web/strategy-switch-console/worker.js
Comment thread web/strategy-switch-console/worker.js Outdated
Co-Authored-By: Codex <noreply@openai.com>

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

ℹ️ 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 +1626 to +1627
if (unavailable !== (normalizedProvenance.freshness === "unavailable") || unavailable !== Object.values(normalizedProvenance).slice(0, 3).every((item) => item === null)) {
throw new Error("data_status/provenance nullability conflict");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Downgrade ready snapshots with stale provenance

When a sync payload has recent timestamps but sets data_status to "ready" and input_provenance.freshness to "stale", this check accepts and stores the contradiction because it enforces only unavailable/null parity. The GET path then retains ready until its timestamp TTL expires, so consumers are told the snapshot is ready despite its authoritative input being explicitly stale; require ready snapshots to have fresh provenance or downgrade their overall status.

Useful? React with 👍 / 👎.

Comment on lines +1551 to +1553
} else if (typeof raw === "string") {
const safe = sanitizeStrategyHealthText(raw, "scalar value", 120, true);
if (safe !== null) result[key] = safe;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject credential URLs in health scalar maps

When a review scalar such as health.review.validation.metric contains a credential URL like https://alice:hunter2@example.invalid/result, this generic sanitizer preserves it because it does not perform the user-info or signed-query checks used by truthStrictSource. The sync route consequently writes the credential-bearing value to KV and the authenticated GET route returns it; apply the URL credential checks to persisted scalar strings as well.

Useful? React with 👍 / 👎.

for raw_binding in raw_bindings:
if not isinstance(raw_binding, dict):
raise ValueError("deployment binding entries must be objects")
source = str(raw_binding.get("readback_source") or "").strip()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject non-string readback sources before coercion

When configuration supplies a non-string readback_source, this coercion can turn it into an apparently safe string rather than rejecting the schema violation. For example, {"password": "synthetic-password"} becomes "{'password': 'synthetic-password'}", which bypasses the assignment-pattern check because of the quotes and is emitted verbatim in the bindings artifact; require the raw value to be a string before trimming so malformed structured values cannot leak credentials.

Useful? React with 👍 / 👎.

@Pigbibi Pigbibi closed this Aug 2, 2026
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