QRS V4 truth labels and clock consistency - #198
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 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".
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 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".
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 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".
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 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".
| if (unavailable !== (normalizedProvenance.freshness === "unavailable") || unavailable !== Object.values(normalizedProvenance).slice(0, 3).every((item) => item === null)) { | ||
| throw new Error("data_status/provenance nullability conflict"); |
There was a problem hiding this comment.
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 👍 / 👎.
| } else if (typeof raw === "string") { | ||
| const safe = sanitizeStrategyHealthText(raw, "scalar value", 120, true); | ||
| if (safe !== null) result[key] = safe; |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
Evidence
Boundary
Merge is not authorized and has not been performed.