Repository navigation
Conversation
Validate statistical metadata without auto-approving scientific interpretations; preserve protected bytes, reject import symlinks, parse DOCX references safely, and index figure pairing. Add 32 audit regression cases and verification report.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e3855c428
ℹ️ 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".
| paragraphs = ["".join(node.text or "" for node in paragraph.iter(namespace + "t")) | ||
| for paragraph in tree.iter(namespace + "p")] |
There was a problem hiding this comment.
Preserve tabs and breaks while extracting DOCX text
For valid DOCX paragraphs containing WordprocessingML control elements such as <w:tab/> or <w:br/>, collecting only w:t descendants concatenates the surrounding runs without a separator (for example, alpha<w:tab/>beta<w:br/>gamma becomes alphabetagamma). This silently corrupts reference excerpts passed to the writing model, potentially changing identifiers or sentence meaning; the extractor should translate these controls to tabs/newlines or otherwise preserve token boundaries.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 366a1ee: preserve w:tab, w:br and w:cr delimiters. Added three regression cases, reproduced failure before the fix, and retained existing XML/ZIP limits and untrusted-reference handling. Awaiting fresh exact-head review.
| if (any(not str(data.get(key) or "").strip() | ||
| for key in ("analysis_type", "method", "method_version", "result")) | ||
| or not re.fullmatch(r"[0-9a-fA-F]{64}", str(data.get("source_artifact_hash") or ""))): |
There was a problem hiding this comment.
Require an analysis type compatible with the claim
For non-equivalence statistical claims, this validates only that analysis_type is nonempty, so a statistical_superiority claim can be paired with an analysis_type="equivalence" artifact and receive a passed statistical-binding result when the other metadata matches. That contradicts the check's strict-binding contract and can mislabel an unrelated analysis as support; validate compatibility with superiority/stability claim types before returning passed.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 366a1ee: restrict analysis type families to claim intent, reject conflicting equivalence/noninferiority and superiority/stability types, and add ten positive/negative binding cases. Successful metadata binding still requires human scientific interpretation. Awaiting fresh exact-head review.
Preserve DOCX inline separators, constrain statistical analysis types, and keep publication repairs byte-exact on Windows. Add cross-host Windows newline simulations and audit evidence; local full suite: 881 passed, 5 skipped.
|
@codex review Please review current head 366a1ee, not the old 4e3855c. Both prior P2 findings are fixed: DOCX preserves tab/br/cr boundaries; statistical binding checks analysis family and rejects equivalence/noninferiority type conflicts without auto-approving interpretation. Windows CI feedback is also addressed: publication source reads and proposal writes preserve exact bytes, test fixtures are explicit, and LF/CRLF x ordinary/simulated-Windows repair cases retain protected-block byte equality. Local current-tree gates: 881 passed, 5 opt-in skipped, 0 failed/collection errors; Ruff passed; mypy 81 files passed; pip check, sdist/wheel build and isolated wheel verification passed. Independent targeted reviews approved both follow-ups. Fresh cross-platform CI is running. Please run security review alongside the code review; previous-head completion is not reused as clearance. Merge remains gated on this exact head and no unresolved findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 366a1eea7c
ℹ️ 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".
| _STATISTICAL_TRIGGERS = ("significant", "equivalent", "non-inferior", "noninferior", | ||
| "robust", "stable", "statistically indistinguishable") |
There was a problem hiding this comment.
Recognize statistical noun forms before coverage gating
When a caller classifies a claim as descriptive_metric, common statistical wording such as “demonstrates equivalence,” “statistical significance,” or “the stability is established” matches none of these triggers. On the current head, review_claim() consequently marks both statistical checks passed and coverage_gate() returns reviewed, allowing the exact classification-bypass protection added here to be evaded; recognize these noun forms as statistical claims as well.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in df04c5c: noun forms share classification and binding intent; typography-only normalization does not alter original claim/source text. Added nine noun/family cases and nine typography cases with red-first evidence. Valid binding still needs human scientific interpretation. Fresh exact-head review requested.
| separators = {namespace + "tab": "\t", namespace + "br": "\n", namespace + "cr": "\n"} | ||
| paragraphs = ["".join(node.text or "" if node.tag == namespace + "t" | ||
| else separators.get(node.tag, "") for node in paragraph.iter()) |
There was a problem hiding this comment.
Preserve remaining inline DOCX character elements
Fresh evidence on the current head shows that a valid run containing alpha<w:noBreakHyphen/>beta is still extracted as alphabeta because every non-w:t element outside this three-entry map is discarded. WordprocessingML also represents displayed characters such as nonbreaking and soft hyphens as elements, so references containing hyphenated identifiers or prose remain silently corrupted; map these character-producing elements to their textual equivalents rather than dropping them.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in df04c5c: map noBreakHyphen to U+2011 and softHyphen to U+00AD, retaining characters in reference excerpts. Added two red-first cases and ensured statistical detection also handles these characters without rewriting source data. Fresh exact-head review requested.
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Recognize statistical noun forms, normalize typography only for classification and binding, preserve DOCX hyphen characters, and keep statistical interpretation human-gated. Add 20 regression cases; full local suite: 901 passed, 5 skipped.
|
@codex review Please review exact current head df04c5c and run security review alongside it. The second-round P1/P2 are fixed: common statistical noun stems feed shared wording/binding/coverage classification; classification-only Unicode normalization also covers nonbreaking/soft hyphens, format characters and non-inferiority spacing without changing original claims or sources. DOCX retains nonbreaking and soft hyphen characters. Twenty new regression cases reproduce failures before fixes, including valid analysis binding versus wrong-family rejection. Statistical interpretation remains human-gated. Exact current local tree: 901 passed, 5 opt-in skips, 0 failed/collection errors; Ruff passed; mypy 81 files passed; pip check/build/isolated wheel verification passed. Independent review: 92 targeted tests passed, no remaining identified blocker. Previous-head results are not clearance for this head. We will wait for exact-head cross-platform/real-backend CI and code/security review before merging. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: df04c5cfcb
ℹ️ 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".
| _STATISTICAL_TYPES = {"statistical_superiority", "statistical_equivalence", "stability"} | ||
| _EQUIVALENCE_TRIGGERS = ("equivalen", "statistically indistinguishable") | ||
| _STABILITY_TRIGGERS = ("robust", "stable", "stabil") | ||
| _STATISTICAL_TRIGGERS = ("significan", *_EQUIVALENCE_TRIGGERS, *_STABILITY_TRIGGERS) |
There was a problem hiding this comment.
Gate explicit statistical-superiority wording
When a claim is mislabeled as descriptive_metric or comparison, explicit wording such as “A is statistically superior to B” or “the analysis shows statistical superiority” matches none of these triggers. Both statistical checks therefore report passed, and coverage_gate() can return reviewed without the required human interpretation. Include the superiority/statistically-superior family in the shared classification so this classification-bypass guard covers the statistical-superiority wording it is intended to protect.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 8217ee8: shared classification now recognizes statistic and superior word families, with checker v5. Six new red-first cases cover mislabeled descriptive/comparison claims and remain human-gated. Full local suite 907 passed, 5 opt-in skipped; fresh exact-head code/security reviews requested before merge.
Recognize statistical and superiority word families across claim classifications. Add six red-first regression cases; local full suite: 907 passed, 5 skipped, with static and packaging gates passed.
|
@codex review Please review exact head 8217ee8 and run the opted-in security review alongside it. The latest P1 is fixed by recognizing statistic and superior word families in shared classification; checker v5. All six new descriptive/comparison regression cases failed before the fix and now require human interpretation. Other binding, Unicode/source-byte and DOCX protections are unchanged. Current-tree local full gates: 907 passed, 5 opt-in skips, 0 failed/collection errors; Ruff passed; mypy 81 files passed; pip check, build and isolated wheel verification passed. Independent final targeted review: 98 passed, no remaining identified blocker. We will not merge until this exact-head CI and code/security reviews complete without unresolved findings; previous heads are not clearance. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8217ee8d5f
ℹ️ 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".
| _STATISTICAL_TYPES = {"statistical_superiority", "statistical_equivalence", "stability"} | ||
| _EQUIVALENCE_TRIGGERS = ("equivalen", "statistically indistinguishable") | ||
| _STABILITY_TRIGGERS = ("robust", "stable", "stabil") | ||
| _STATISTICAL_TRIGGERS = ("statistic", "superior", "significan", *_EQUIVALENCE_TRIGGERS, *_STABILITY_TRIGGERS) |
There was a problem hiding this comment.
Gate explicit p-values as statistical claims
Fresh reproduction on exact head shows that a descriptive/comparison claim using standard statistical notation instead of these stems—such as A outperforms B (p=0.01)—leaves _is_statistical_claim() false; review_claim() consequently marks both statistical checks passed and coverage_gate() returns reviewed. This still bypasses the required human interpretation boundary, so recognize unambiguous p-value/test-result notation in the shared classifier.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 87c5e98. The shared classification now gates explicit p-values, confidence/credible intervals, and common bounded LaTeX p-value formatting without modifying source text. Added 33 regression cases, including a non-statistical CI workflow positive. Independent targeted review: 131 passed; full local suite: 940 passed / 5 skipped. Waiting for fresh exact-head CI and both Codex reviews; not merging on previous-head results.
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 87c5e9898e
ℹ️ 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 source: | ||
| source_path = reject_symlink_components( | ||
| sources_dir.parent / str(source.get("path") or ""), anchor=sources_dir.parent) | ||
| if hashlib.sha256(source_path.read_bytes()).hexdigest() != source.get("sha256"): |
There was a problem hiding this comment.
Normalize source hashes before reconciliation
When a manifest uses an uppercase SHA-256, validate_import() and approval_valid() accept it by comparing against expected.lower(), so the import can be approved and materialized; this new case-sensitive comparison then immediately marks that valid materialization orphaned and forces manual intervention. Compare against a normalized declared digest here as well.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 09c758e. Reconciliation normalizes only the declared source digest for byte comparison, consistently with validation and approval. Added lower/upper/mixed-case complete import-flow cases; changed source bytes remain rejected and clean reconciliation leaves the DB untouched. Full local suite: 946 passed / 5 skipped; independent Python review approved. Fresh exact-head CI and dual reviews remain required.
| paragraphs = ["".join(node.text or "" if node.tag == namespace + "t" | ||
| else characters.get(node.tag, "") for node in paragraph.iter()) |
There was a problem hiding this comment.
Preserve DOCX symbol runs during extraction
Fresh reproduction on this exact head with a valid w:sym run (alpha<w:sym .../><w:t>beta</w:t>) still yields alphabeta and reports no need for human review because every unmapped inline element becomes an empty string. Word uses w:sym for displayed font-mapped characters such as mathematical or Greek symbols, so silently dropping it can corrupt identifiers and formulas; preserve these symbols or fail closed instead of concatenating adjacent text.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 09c758e. DOCX containing w:sym now fails closed with an empty excerpt and needs_human_review, retaining the original ZIP hash. Font-specific glyph codes are not guessed as Unicode. Added Symbol, Wingdings, and unknown-font regressions; repaired import/reference tests: 43 passed, full local suite: 946 passed / 5 skipped. Waiting for fresh exact-head CI and both reviews before merge.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 09c758ecba
ℹ️ 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".
| return (claim.claim_type in _STATISTICAL_TYPES | ||
| or bool(_NONINFERIORITY_PATTERN.search(text)) | ||
| or bool(_P_VALUE_PATTERN.search(text)) | ||
| or bool(_INTERVAL_PATTERN.search(text)) | ||
| or any(trigger in text for trigger in _STATISTICAL_TRIGGERS)) |
There was a problem hiding this comment.
Gate standard test-statistic notation
Fresh reproduction on this exact head shows that a descriptive/comparison claim such as A outperformed B (t(18)=2.4) or A outperformed B, F(2,20)=5.1 matches none of these classifiers. Both statistical checks consequently report passed, and coverage_gate() returns reviewed without the human interpretation that this change requires for explicit statistical results; recognize common t/F/chi-square test-statistic notation alongside p-values and intervals.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 93f7eba. Shared classification now recognizes common t/F/z/U/W/H and chi-square/chi2/Unicode/limited LaTeX statistic notation, bounded numeric degrees of freedom, and comparison signs. Interpretation remains needs_human even with correctly bound significance metadata; original text remains unchanged. Added 26 red-first cases (26 failed / 90 passed before fix); audit/core/U4B: 171 passed, independent review approved (129 focused passed), full local suite: 972 passed / 5 skipped. Waiting for fresh exact-head CI and both reviews.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 93f7eba908
ℹ️ 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".
| r"\s*[+-]?(?:\d+(?:\.\d*)?|\.\d+)") | ||
| _INTERVAL_PATTERN = re.compile(r"\b(?:\d+(?:\.\d+)?\s*(?:%|\\%)\s*ci\b|(?:confidence|credible)\s+interval\b)") | ||
| _TEST_STATISTIC_PATTERN = re.compile( | ||
| r"\b(?:[tfzuwh]|chi[\s-]*squared?|(?:chi|\u03c7)\s*(?:2|\^\s*(?:2|\{2\})))" |
There was a problem hiding this comment.
Recognize correlation-statistic notation
Fresh evidence on the exact head shows that standard correlation results such as r(18)=0.52 are excluded from this test-statistic pattern. When such a claim is classified as descriptive_metric or comparison, both statistical checks pass and coverage_gate() can return reviewed, bypassing the required human interpretation boundary; include Pearson/Spearman correlation-statistic notation in the shared classifier.
Useful? React with 👍 / 👎.
Summary
Comprehensive PaperForge audit against main fb41959. Fixes scientific evidence binding/classification, protected source byte preservation, symlink-safe import handling, DOCX main-body extraction, and Windows repair I/O; indexes publication graph pairing.
Current head
93f7eba: gates common test-statistic notation. Earlier fixes cover p-values, intervals, bounded LaTeX formatting, digest casing, and fail-closed DOCX symbols. Source bytes/hashes are preserved; statistical interpretation still requires a human. No manuscript-only/fixture values are promoted to measured Evidence.
Verification
Merge gates
Fresh exact-head CI, Codex code review, and Codex security review are required. Prior-head results, pending/error/quota-skipped reviews are not acceptance. All blocking findings must be fixed and re-reviewed; no administrator bypass. User authorized push and merge only after successful reviews.