Enforce strict latest theme linkage#38
Conversation
Co-Authored-By: Codex <noreply@openai.com>
🤖 Codex PR Review🚫 Merge blocked: 2 serious issue(s) found in high-risk files ⚖️ Codex Review Arbitration🚫 block: 🚫 Blocking IssuesThese issues must be fixed before this PR can be merged: 1. 🟠 [HIGH] Security in
|
Co-Authored-By: Codex <noreply@openai.com>
|
Stopped after the single permitted remediation. The follow-up review still blocks on relative-source path escape outside signal_base_dir and validating SHA-256 plus JSON/as_of from separate file reads. No further changes or merge will be made in this PR; B2/C remain blocked until linkage arbitration is resolved. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e54123ae3d
ℹ️ 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".
| def validate_latest_signal( | ||
| payload: Mapping[str, Any], | ||
| *, | ||
| theme_artifact_path: str | Path | None = None, | ||
| ) -> None: | ||
| """Validate a v2 signal against its declared theme artifact linkage.""" | ||
| validate_signal(payload) |
There was a problem hiding this comment.
Route latest validation through the strict checker
In the contexts I checked, this new strict validator is not used outside the added tests: scripts/validate_latest_signal.py still imports/calls validate_signal, and both .github/workflows/ci.yml and dispatch_shadow_signal.yml invoke that script. A v2 latest signal whose declared theme_momentum_snapshot has a mismatched as_of or bad hash is still reported as valid by the existing validation workflow, so the linkage added here is not actually enforced for the repository's validation path. Please route the latest-signal CLI/workflows, or an equivalent production validation path, through validate_latest_signal while preserving legacy/example handling as needed.
Useful? React with 👍 / 👎.
|
Superseded after the single allowed remediation. Re-slicing from latest main into a library-only strict-linkage validator primitive; CLI/workflow enforcement will follow in a separate PR. No further changes will be made on this PR. |
Summary
as_ofequalityScope
Linkage integrity only. Expiry, UTC reference-date handling, CLI flags, and coverage/data-quality gates are intentionally deferred to B2/C.
Validation
python3 -m pytest -q tests/test_signal_validation.py(15 passed)python3 -m pytest -q(45 passed)git diff --checkResearch-only scope; no execution, portfolio, account, or production dependency changes.