Skip to content

Phase 0: establish foundational research contract - #1

Merged
EmergentMonk merged 41 commits into
mainfrom
phase-0/research-contract
Oct 7, 2026
Merged

EmergentMonk merged 41 commits into
mainfrom
phase-0/research-contract

Conversation

@EmergentMonk

@EmergentMonk EmergentMonk commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Establishes Phase 0 of CONSTRAINT-SHIFT as a falsifiable, machine-checkable research contract.

Research foundation

  • Defines the central Constraint Shift thesis without treating it as established fact.
  • Formalizes H1–H6, terminology, methodology, evidence classes, comparability rules, human-intervention recording, negative-result retention, and human-subject safeguards.
  • Establishes research invariants, fills the five initial research tracks, and defines Phases 1–10.

Validation

Headings, prose, resolved references, and quote/list ownership now come from one CommonMark parse per required file. This removes the separate handwritten visibility, reference, code-span, HTML, and prose scanners that produced recurring inconsistent results.

For example, a reference definition after an exited quote-scoped comment now resolves correctly; malformed numeric entities and intraword underscores cannot manufacture required prose. A quoted ATX heading cannot extend its inline comment into an unquoted paragraph.

  • Pins and hashes markdown-it-py==4.2.0 and mdurl==0.1.2.
  • Retains upstream parser rules with explicit 999-character reference-label and ASCII paragraph-trimming corrections; attribution and removal criteria are documented.
  • Preserves exact ordered heading inventories, nested ATX eligibility, and Setext exclusion.
  • Documents decoded prose/heading policy, metadata exclusions, block boundaries, and the source-size heuristic.
  • Handles missing, empty, unreadable, and invalid UTF-8 files with diagnostics and nonzero status.
  • Adds the bundled review regressions, current review reproductions, 294 generated ownership transitions, 652 official CommonMark examples, 40 explicit adapter projections, CLI tests, and a bounded long-paragraph check.
  • Runs CI on Python 3.12 and 3.14.

Validation

Clean installations on Python 3.12.14 and 3.14.7: repository validator passes, all 215 tests pass, and all 18 separately supplied review tests pass. git diff --check passes.

python3 -m pip install --require-hashes -r requirements.txt
python3 scripts/validate_phase0.py
python3 -m unittest discover -s tests -v

See validation policy for behavior changes, parser limitations, and corpus attribution. The official corpus comparison normalizes only newline formatting in empty blockquotes; full CommonMark conformance is not claimed.

Motivation is not evidence: none of the six hypotheses is considered supported merely because it is documented here.

@sourcery-ai

sourcery-ai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

This PR establishes Phase 0 as a machine-checkable, falsifiable research contract: it separates hypotheses and motivation from evidence, defines methodology and safeguards for future experiments, documents five initial research tracks and the full roadmap, and enforces contract completeness through dependency-free tests and GitHub Actions CI.

Flow diagram for the Phase 0 research contract

flowchart TD
    A[Human motivation] --> B[ falsifiable hypothesis ]
    B --> C[Freeze task contract]
    C --> D[Run controlled trials]
    D --> E[Independent verification]
    E --> F[Retain successes and failures]
    F --> G[Bounded conclusion]
    G --> H[Supported, weakened, or falsified]
    A -. not evidence .-> H
Loading

Flow diagram for the CONSTRAINT-SHIFT research roadmap

flowchart LR
    P0[Phase 0: Research contract] --> P1[Phase 1: Experiment schema]
    P1 --> P2[Phase 2: Language harness]
    P2 --> P3[Phase 3: Compiler feedback]
    P3 --> P4[Phase 4: Legacy preservation]
    P4 --> P5[Phase 5: Implementation fungibility]
    P5 --> P6[Phase 6: Modding and recombination]
    P6 --> P7[Phase 7: Tool legitimacy]
    P7 --> P8[Phase 8: Language fitness model]
    P8 --> P9[Phase 9: Replication and sensitivity]
    P9 --> P10[Phase 10: Archival release]
Loading

File-Level Changes

Change Details Files
Defines the repository’s falsifiable research contract and shared methodology.
  • Documents six hypotheses with candidate measurements and falsification criteria.
  • Adds controlled-experiment lifecycle, evidence classes, comparability rules, metadata requirements, statistical guidance, and human-subject safeguards.
  • Defines project terminology and 14 invariants, including explicit separation of motivation from evidence.
  • Adds five research-track briefs with initial questions, candidate experiments, and scope boundaries.
README.md
HYPOTHESES.md
TERMINOLOGY.md
METHODOLOGY.md
INVARIANTS.md
research/specification-primacy.md
research/language-selection.md
research/legacy-preservation.md
research/ai-modding.md
research/tool-legitimacy-gap.md
Adds an executable validation layer for Phase 0 contract completeness.
  • Checks required artifacts, hypothesis identifiers, terminology headings, invariant identifiers, roadmap entries, thesis-status language, and minimum document size.
  • Keeps validation dependency-free using Python standard-library functionality.
  • Adds unit tests for repository validation, hypothesis uniqueness, and safe repository-relative file declarations.
scripts/validate_phase0.py
tests/test_phase0.py
Establishes the empirical roadmap and continuous validation workflow.
  • Marks Phase 0 deliverables complete and defines Phases 1–10 through archival release.
  • Runs the validator and unit tests on pushes to main and pull requests with pinned Python 3.12 setup and read-only repository permissions.
ROADMAP.md
.github/workflows/phase0.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 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-10-07T02:08:46.989342Z c0946e4 Manual request
🔒 Security Review ✅ Completed 2026-10-06T07:35:20.872261Z f0251b7 PR opened
ℹ️ 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.

@sourcery-ai sourcery-ai 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.

Hey - I've found 4 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="research/tool-legitimacy-gap.md" line_range="12" />
<code_context>
+## Core design principle
+When testing disclosure, the artifact must remain constant.
+
+A minimal randomized design could expose participants to an identical artifact with descriptions such as independent human creator, independent creator using AI-assisted development tools, or primarily AI-generated under human direction.
+
+## Candidate outcomes
</code_context>
<issue_to_address>
**Disclosure effect cannot be isolated**

When the proposed descriptions are used to evaluate H6 or estimate `D_AI`, the conditions vary both disclosure and the stated degree of AI authorship, and none provides an undisclosed baseline. Their ratings therefore cannot isolate the disclosure effect or estimate the stated penalty.

Use conditions that vary disclosure while holding the artifact and stated authorship constant, and include an undisclosed condition for the `D_AI` contrast.

Also at `research/tool-legitimacy-gap.md:25-27`, `research/tool-legitimacy-gap.md:32`.
</issue_to_address>

### Comment 2
<location path="research/language-selection.md" line_range="18" />
<code_context>
+Phase 0 rejects a premature universal score. A language/toolchain observation should initially preserve separate measured dimensions. Definitions and measurement procedures must precede aggregation.
+
+## Candidate experiment
+Give one agent/model an equivalent task contract across several languages.
+
+Record first-generation validity, compile attempts, diagnostic cycles, test failures, repair iterations, human interventions, completion outcome, static/formal check outcomes, and time/token/cost data where reliable.
</code_context>
<issue_to_address>
**Language comparison cannot isolate diagnostics**

When cross-language outcomes from the proposed experiment are used to support or weaken H2, the proposed comparison varies languages and toolchains while measuring outcomes, but does not independently vary diagnostic quality or specify how to control the listed confounds. Differences in outcomes therefore cannot establish that diagnostics or constraints caused an advantage, which is the claim in H2.

Specify a design that isolates diagnostic and constraint effects, such as controlled conditions within toolchains, and state how the listed confounds will be matched or controlled.
</issue_to_address>

### Comment 3
<location path="scripts/validate_phase0.py" line_range="34" />
<code_context>
+    "H6 — Tool Legitimacy Gap",
+)
+
+TERMS = (
+    "Constraint Shift",
+    "Implementation Fungibility",
</code_context>
<issue_to_address>
**Missing terms pass validation**

When a terminology definition omitted from `TERMS` is removed, `validate_repo()` checks only the headings listed in `TERMS`, so removing Specification Primacy, Machine Verifiability, Diagnostic Feedback Quality, or Research Contract still passes validation and CI reports a valid contract.

Add every contractually required terminology heading to `TERMS`.

Also at `scripts/validate_phase0.py:35-42`, `scripts/validate_phase0.py:74-76`.
</issue_to_address>

### Comment 4
<location path="scripts/validate_phase0.py" line_range="70-72" />
<code_context>
+    if errors:
+        return errors
+
+    for identifier in HYPOTHESES:
+        if identifier not in texts["HYPOTHESES.md"]:
+            errors.append(f"missing hypothesis contract: {identifier}")
+
+    for term in TERMS:
</code_context>
<issue_to_address>
**Duplicate hypothesis headings pass**

When a hypothesis heading is duplicated while all six expected identifiers remain present, `validate_repo()` checks only whether each identifier appears somewhere, and the uniqueness test checks the constant tuple rather than the Markdown headings. The duplicate therefore passes CI and leaves an ambiguous research contract.

Parse the hypothesis headings from `HYPOTHESES.md` and validate their expected contents and uniqueness.

Also at `tests/test_phase0.py:18-19`, `scripts/validate_phase0.py:35-42`.
</issue_to_address>

Sourcery assessment

Approval pending. 4 findings to address first.

Blocking findings: research/tool-legitimacy-gap.md:12, research/language-selection.md:18, scripts/validate_phase0.py:34, scripts/validate_phase0.py:72


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread research/tool-legitimacy-gap.md Outdated
Comment thread research/language-selection.md Outdated
Comment thread scripts/validate_phase0.py
Comment thread scripts/validate_phase0.py Outdated
sourcery-ai[bot]
sourcery-ai Bot previously approved these changes Oct 6, 2026

@sourcery-ai sourcery-ai 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.

Sourcery assessment

Approved.

Copy link
Copy Markdown
Member Author

@codex Please review this exact SHA 9ea5418c265983391389b452fd3e48e3e4528c76 against the Phase 0 research contract. Report only actionable correctness, methodology, validation, or security defects. For each finding, give a minimal reproduction or concrete failure mode, expected versus actual behavior, and affected lines. State whether the finding was executed or statically inferred. Do not repeat fixed findings without a new failing case.

Copy link
Copy Markdown
Member Author

@sourcery-ai review

Please review this exact SHA 9ea5418c265983391389b452fd3e48e3e4528c76. The previous four findings were addressed: disclosure-effect isolation, H2 diagnostic/constraint causal design, complete terminology enforcement, and duplicate hypothesis-heading enforcement. Report any remaining actionable defects against this exact head.

Copy link
Copy Markdown
Member Author

@codex review

Please review exact SHA 9ea5418c265983391389b452fd3e48e3e4528c76. Report only new actionable defects; do not repeat the four Sourcery findings already fixed unless you have a new failing reproduction.

@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: 9ea5418c26

ℹ️ 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 scripts/validate_phase0.py Outdated

Copy link
Copy Markdown
Member Author

@codex review

Please review exact SHA 57e851709295b355c7301c0fff97564a95f408fe against the Phase 0 research contract. The fenced-Markdown heading finding is addressed with fence-aware parsing plus regression tests. Report only new actionable defects, with a concrete reproduction or failure mode.

Copy link
Copy Markdown
Member Author

@sourcery-ai review

Please review exact SHA 57e851709295b355c7301c0fff97564a95f408fe. CI is green. Report only remaining actionable defects; do not repeat resolved findings without a new failing case.

@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: 57e8517092

ℹ️ 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 scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread HYPOTHESES.md Outdated

Copy link
Copy Markdown
Member Author

@codex review

Please review exact SHA 8fd06993359f171004eede116f8a09e7368dc00c against the Phase 0 research contract. The four latest findings are addressed with executed regressions where applicable. Report only new actionable defects with a concrete reproduction or failure mode; do not repeat resolved findings without new evidence.

Copy link
Copy Markdown
Member Author

@sourcery-ai review

Please review exact SHA 8fd06993359f171004eede116f8a09e7368dc00c. Phase 0 CI is green. Report only remaining actionable defects; do not repeat resolved findings without a new failing case.

@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: 8fd0699335

ℹ️ 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 scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread research/legacy-preservation.md Outdated
Comment thread INVARIANTS.md Outdated
Comment thread HYPOTHESES.md Outdated
@sourcery-ai
sourcery-ai Bot dismissed their stale review October 6, 2026 08:35

Sourcery withdrew this approval because it has stopped reviewing this pull request.

@sourcery-ai

sourcery-ai Bot commented Oct 6, 2026

Copy link
Copy Markdown

Sourcery has withdrawn its approval of this pull request. It auto-reviews a pull request 5 times, and this push is past that limit, so the approval no longer reflects code Sourcery has read.

Comment @sourcery-ai review to get a fresh review, which can approve again.

Re-reviews, rate limits and approvals

Copy link
Copy Markdown
Member Author

@codex review

Please review exact SHA 1e1fa9cefa5f8c8db502f0dc79909469de92685d against the Phase 0 research contract. The latest five findings are addressed and CI is green. Report only new actionable defects with a concrete reproduction or failure mode; do not repeat resolved findings without new evidence.

Copy link
Copy Markdown
Member Author

@sourcery-ai review

Please review exact SHA 1e1fa9cefa5f8c8db502f0dc79909469de92685d. Phase 0 CI is green. Report only remaining actionable defects; do not repeat resolved findings without a new failing case.

@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: 1e1fa9cefa

ℹ️ 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 scripts/validate_phase0.py Outdated
Comment thread research/tool-legitimacy-gap.md Outdated
Comment thread research/ai-modding.md Outdated
Comment thread research/language-selection.md Outdated
Comment thread METHODOLOGY.md Outdated

Copy link
Copy Markdown
Member Author

@codex review

Please review exact SHA 20d12cc0811ca86ab40930aae45de5fe9a1876cd against the Phase 0 research contract. The latest five findings are addressed and CI is green. Report only new actionable defects with a concrete reproduction or failure mode; do not repeat resolved findings without new evidence.

Copy link
Copy Markdown
Member Author

@codex Please Review this exact SHA b0e1e79 against the existing contract. Report only actionable correctness defects, with a minimal reproduction, expected versus actual behavior, and affected lines. State whether each reproduction was executed or statically inferred. Don’t repeat fixed findings without a new failing case. Keep architectural suggestions separate and non-blocking.

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

ℹ️ 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 scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated

Copy link
Copy Markdown
Member Author

@codex Please Review this exact SHA cb405dd against the existing contract. Report only actionable correctness defects, with a minimal reproduction, expected versus actual behavior, and affected lines. State whether each reproduction was executed or statically inferred. Don’t repeat fixed findings without a new failing case. Keep architectural suggestions separate and non-blocking.

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

ℹ️ 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 scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated

Copy link
Copy Markdown
Member Author

@codex Please Review this exact SHA b8aacc5 against the existing contract. Report only actionable correctness defects, with a minimal reproduction, expected versus actual behavior, and affected lines. State whether each reproduction was executed or statically inferred. Don’t repeat fixed findings without a new failing case. Keep architectural suggestions separate and non-blocking.

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

ℹ️ 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 scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated

Copy link
Copy Markdown
Member Author

@codex Please Review this exact SHA 3ea0ba8 against the existing contract. Report only actionable correctness defects, with a minimal reproduction, expected versus actual behavior, and affected lines. State whether each reproduction was executed or statically inferred. Don’t repeat fixed findings without a new failing case. Keep architectural suggestions separate and non-blocking.

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

ℹ️ 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 scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated

Copy link
Copy Markdown
Member Author

@codex Please Review this exact SHA 75c74db against the existing contract. Report only actionable correctness defects, with a minimal reproduction, expected versus actual behavior, and affected lines. State whether each reproduction was executed or statically inferred. Don’t repeat fixed findings without a new failing case. Keep architectural suggestions separate and non-blocking.

@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: 75c74db17a

ℹ️ 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 scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated

Copy link
Copy Markdown
Member Author

@codex Please Review this exact SHA 778105b against the existing contract. Report only actionable correctness defects, with a minimal reproduction, expected versus actual behavior, and affected lines. State whether each reproduction was executed or statically inferred. Don’t repeat fixed findings without a new failing case. Keep architectural suggestions separate and non-blocking.

@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: 778105b309

ℹ️ 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 scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated

Copy link
Copy Markdown
Member Author

@codex Please Review this exact SHA f5b9b2f against the existing contract. Report only actionable correctness defects, with a minimal reproduction, expected versus actual behavior, and affected lines. State whether each reproduction was executed or statically inferred. Don’t repeat fixed findings without a new failing case. Keep architectural suggestions separate and non-blocking.

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

ℹ️ 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 scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated
Comment thread scripts/validate_phase0.py Outdated

Copy link
Copy Markdown
Member Author

@codex Please Review this exact SHA 44c9e0c against the existing contract. Report only actionable correctness defects, with a minimal reproduction, expected versus actual behavior, and affected lines. State whether each reproduction was executed or statically inferred. Don’t repeat fixed findings without a new failing case. Keep architectural suggestions separate and non-blocking.

@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: 44c9e0cf91

ℹ️ 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 scripts/validate_phase0.py Outdated
Comment on lines +2002 to +2007
visible_line, next_comment_state = _mask_html_comments(
code_safe_line, in_html_comment
)
if in_html_comment or next_comment_state:
in_html_comment = next_comment_state
paragraph_open = False

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 Stop comments when their reference-discovery container ends

Executed reproduction: after removing the roadmap's original required phrase, append [visible][machine-checkable Phase 0 validator]\n\n> <!--\n[machine-checkable Phase 0 validator]: /url; validate_texts() returns []. Expected the missing-validator error because the unclosed comment belongs to the block quote, ends when the definition line exits that quote, and therefore does not prevent the top-level definition from resolving the reference. Actual reference discovery carries in_html_comment across the container exit and skips the definition; this is a new failing path in the reference-label scanner, separate from the visible-line comment handling.

Useful? React with 👍 / 👎.

Comment thread scripts/validate_phase0.py Outdated
Comment on lines +2108 to +2109
def _normalize_rendered_visible_text(text: str) -> str:
text = html.unescape(text)

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 Require valid Markdown entity syntax before decoding

Executed reproduction: replace the roadmap's required phrase with machine&#45checkable Phase 0 validator; validate_texts() returns []. Expected roadmap does not require Phase 0 validator because the numeric character reference lacks its required semicolon, so Markdown renders it literally and the contiguous required phrase is absent. Actual html.unescape() applies permissive HTML parsing and converts &#45 to -, manufacturing the phrase.

Useful? React with 👍 / 👎.

Comment thread scripts/validate_phase0.py Outdated
Comment on lines +2114 to +2116
text = re.sub(
r"(?<!\\)(\*\*|__)(?=\S)(.+?)(?<=\S)\1",
r"\2",

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 Enforce delimiter flanking when removing emphasis markers

Executed reproduction: replace the roadmap's required phrase with machine__-checkable__ Phase 0 validator; validate_texts() returns []. Expected the missing-validator error because the first intraword underscore run cannot open emphasis under Markdown's underscore-flanking rules, leaving the underscores rendered and the required phrase noncontiguous. Actual normalization removes any paired __ around non-whitespace, producing machine-checkable Phase 0 validator regardless of delimiter eligibility.

Useful? React with 👍 / 👎.

Comment thread scripts/validate_phase0.py Outdated
Comment on lines +1179 to +1182
comment_allows_lazy_continuation = (
paragraph_open
or bool(visible_comment_prefix.strip(" \t"))
)

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 Limit lazy comment continuation to paragraph blocks

Executed reproduction: after removing the roadmap's original required phrase, append > ## heading <!--\nmachine-checkable Phase 0 validator -->; validate_texts() reports roadmap does not require Phase 0 validator. Expected no error because an ATX heading is a single-line leaf block, so the unquoted second line cannot lazily continue the quoted heading and its required phrase remains visible. Actual comment eligibility treats any nonempty prefix—including ## heading—as a paragraph that permits lazy continuation, so the second line is incorrectly masked.

Useful? React with 👍 / 👎.

Derive headings, references, ownership and prose from one token stream.
Retain upstream rules with explicit reference-length and whitespace corrections.
Add review regressions, official corpus projections, CLI and performance checks.
Pin and hash dependencies; validate on Python 3.12 and 3.14.
@EmergentMonk

Copy link
Copy Markdown
Member Author

@codex Please Review this exact SHA c0946e4 against the existing contract. Report only actionable correctness defects, with a minimal reproduction, expected versus actual behavior, and affected lines. State whether each reproduction was executed or statically inferred. Don’t repeat fixed findings without a new failing case. Keep architectural suggestions separate and non-blocking.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: c0946e4d15

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

@EmergentMonk
EmergentMonk merged commit dd9ab57 into main Oct 7, 2026
3 checks passed
@EmergentMonk
EmergentMonk deleted the phase-0/research-contract branch October 7, 2026 02:29
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