Skip to content

feat: add bounded controlled Java fault matrix - #320

Merged
jacksonpradolima merged 6 commits into
mainfrom
feat/304-controlled-java-matrix
Oct 17, 2026
Merged

jacksonpradolima merged 6 commits into
mainfrom
feat/304-controlled-java-matrix

Conversation

@jacksonpradolima

@jacksonpradolima jacksonpradolima commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

COLEMAN could reproduce one pinned Java fault pair. This adds a bounded, predeclared CLI/Codec source matrix with typed plans/indices, offline integrity validation and durable recovery, reusing the existing JUnit producer and generic controlled-observation domain.

Closes #304. Part of #261; source admission, diversity coverage, baselines and protected confirmation remain open in #309–#313.

Contract and architecture

  • Schema-1 matrix plans: at most 16 cells / 4 MiB, stable cell and recipe/trial identities, explicit source/fixture curation and limitations. Duplicate logical collections reject.
  • Schema-1 indices: at most 8 MiB, dataset/context/raw-packet fingerprints, typed same-test pair counts, explicit unobserved pairs and per-role integer producer nanoseconds. Observed zero differs from unavailable/null; incompatible units, negative counters and non-finite values reject.
  • Reuse source views/cache, existing bounded Docker capture/acknowledgments, ControlledDataset, immutable artifacts and existing native CI/checkpoints. No existing producer/domain implementation or original CLI-13 recipe changes; no new dependency or learning framework.
  • Validate actual source/context/raw-protocol/normalized-observation correspondence. Recomputing every digest cannot certify a rewritten outcome, context, missing role packet or fabricated parsed case.
  • Persist immutable plan.json before source execution. Publish a content-addressed index and write complete.json last only when every role was collected. Incomplete evidence remains indexed without completion; unattempted cells remain in the frozen plan.
  • Reopening a completed matrix verifies cached evidence without Docker/runtime preflight. Concurrent ownership conflicts preserve the existing reject-and-retry behavior; no duplicate role execution. Idempotence requires the retained output/capture tree, not a fresh directory with reused trial labels.
  • Domain import boundaries remain unchanged: Java producer/orchestration lives in optional transports; the generic controlled domain imports no CLI/MCP/Docker adapter.

Sources and scientific limits

Selection was recorded before new source outcomes.

Curated fix Tests per role Both pass Both fail Assertion failed → passed Inconclusive
CLI-13 95 92 2 1 0
CLI-51 96 93 2 0 1
CODEC-65 166 163 0 3 0

Actual source qualification collected 714 role observations / 357 same-test pairs. CLI-51 raises UnrecognizedOptionException in the buggy role and passes in the fixed role; the existing strict classifier retains this as inconclusive. Both CLI fixtures retain two assertions failing in both revisions. Three Codec triggering methods belong to one curated fix; the CLI fixes share project history. Labels, tests and repeated trials do not establish independent projects/faults.

Codec keeps all 25 production Java files per role, 15 selected fixed fixture Java files, LICENSE and NOTICE. Before outcomes, excluded DoubleMetaphoneTest (separately noticed aspell data/non-UTF8 bytes), SoundexTest (non-UTF8 bytes), and their AllTests aggregator. RefinedSoundexTest remains included. Source bytes are not transcoded and no post-outcome test filtering occurs. These are direct-upstream parent/fix reproductions, not full upstream build/Defects4J reconstruction.

The conscious annotation correction and old/new descriptor fingerprints record that subsequent source inspection identified unseeded java.util.Random inputs in Base64Test, HexTest and DigestUtilsTest. All selected tests remain; the uncaptured generated inputs/seeds are explicitly disclosed in recipes and documentation. A provenance-only annotation correction preserves every source/dependency/runtime/harness pin and test ID. Replaying stored observations is distinct from exactly reconstructing fresh generated test inputs.

The pinned Temurin 11.0.32.1/linux-arm64 image, explicit America/Los_Angeles timezone, common fixture and raw JAR/terms pins remain visible. Per-role process time differs from case time, runner work, memory and CI latency. The fixture shares a JVM/lexical order; order independence is unverified. All outputs remain constructed, not_evaluated and insufficient_evidence.

Usage and compatibility

The complete guide includes external wheel installation, explicit image preparation, source acquisition, CLI/Python calls, source terms, Mermaid architecture, recovery and installed verification. With the reviewed wheel installed and pinned image prepared:

from pathlib import Path
from coleman.artifacts import ArtifactWriter
from coleman.corpus.materialization import SourceCache
from coleman.transports.junit_matrix import (
    capture_junit_matrix, load_junit_matrix, validate_junit_matrix,
)

cache = SourceCache("/tmp/coleman-java-source-cache")
writer = ArtifactWriter("/tmp/coleman-java-observations")
outcome = capture_junit_matrix(load_junit_matrix(), cache, writer, fetch=True)
validate_junit_matrix(outcome.receipt, cache, Path(writer.run_root))

Source/cache/output storage stays outside Git. Fetch is explicit and uses the existing bounded public HTTPS transport; subject execution has no network. The producer never pulls an image. Large foreign sources/dependencies/captures are not vendored.

Existing single-pair recipes, controlled artifacts, native results, RunSpec identities and learning checkpoints require no migration. New matrix schema readers reject missing/older/future versions; unknown producers reject with an explicit compatibility requirement. Changed implementation/package version selects a new generation; old bytes are not silently rewritten. Offline validation needs the matching reviewed producer plus actual controlled datasets/cache, not just an index.

How this was tested

Final exact-head full suite: 2,680 passed, 1 Linux-only skip, 13 existing warnings; 95.27% branch-aware coverage in 835.27 seconds. HEAD 8938121e70c677ff725a144ea27ccb32b6a8a661 and all source/test bytes remained unchanged throughout.

Commands:

UV_NO_SYNC=true make lint format-check typecheck interrogate cost-structural docs build
.venv/bin/pylint -E coleman
uvx --from uv==0.13.1 uv run --no-project --python .venv/bin/python \
  -m pytest -n4 --cov --cov-branch --junitxml=/tmp/coleman-320-transitive-full.xml \
  -o junit_family=legacy -o faulthandler_timeout=240
git diff --check

The full run enables the prepared real Java, LRTS, RTPTorrent ZIP64/ETL and LRTS stage caches; Syft 1.42.3 is available for release-package checks. Normal owned tests remain network-free. Additional evidence covers:

  • Versioned plan/index goldens, old recipe bytes, round-trips, future schemas, units/missingness and non-finite rejection.
  • Declaration/role-order and transitive-producer identity metamorphisms; duplicate/idempotence, concurrent ownership, interrupted capture/publication and offline continuation.
  • Self-consistent repinned source/raw/index forgeries, filesystem containment, metadata budgets and explicit negative/inconclusive outcomes.
  • Fresh installed base wheel outside checkout: actual three-source Java matrix without principal-component mocks, exact observed counts, offline validation/replay, packaged metadata/harness and domain import boundaries.
  • Separate owned native CI exact-answer/checkpoint flow; Java elapsed counters are never substituted for CI costs. Existing actual historical-CI Parquet/native/checkpoint flows remain in the full suite.
  • Strict documentation, release navigation, deterministic generated llms.txt, source metadata/pin audits and the actual release-workflow selector for 4.10.0 notes. No manual bump; reviewed EN-US release description is included.

Test configuration: Python 3.14.6/macOS arm64 host, pinned native Linux arm64 Temurin 11.0.32.1 Docker image; pytest 9.0.3, uv 0.13.1. Hardware-specific performance claims are not made.

Local review

OpenCodeReview 1.12.13 local delegation only:

npx --yes @alibaba-group/open-code-review@1.12.13 delegate preview \
  --format json --from main --to HEAD \
  -b 'Implement public issue #304: bounded controlled Java real-fault matrix with pinned recipes, explicit negative evidence, raw provenance and offline recovery'

Also ran workspace preview and delegate rule for every changed path. Six supported files plus twelve exclusions were manually reviewed, including every test, Markdown file, golden and generated artifact: 18/18 files, 100% file review coverage. JSON values received separate typed/source-pin review beyond the tool's key-only rule. No code was sent to an external review endpoint. All confirmed blocking findings were corrected; review was repeated after material changes. Evidence: /tmp/coleman-304-complete-local-review.json, local preview/rules/full-diff records, source-disclosure proof and final frozen-source stability proof.

  • Meaningful conventional title; repository conventions followed.
  • Ruff lint/format, types, Pylint, docstrings, structural cost and strict docs checked (Ruff is the prescribed current linter; the template's flake8 item is obsolete).
  • Self-review, useful docstrings, tests and human documentation updated.
  • Final new/existing tests pass on the exact reviewed head.
  • Prerequisite producer/domain changes already merged/published; no stacked implementation or new dependency.

PR review follow-up: the new CLI validation mode accepts bounded receipt JSON from stdin, not a filesystem path. Filepath arguments (including parent/symlink aliases) are rejected without opening their files; oversized stdin rejects before parsing. Typed Python validation and all source collection logic remain unchanged. Updated the installed real-package CLI workflow and guide, repeated the entire 18-file local delegation/manual review and all exact-head checks. The repeated-literal and split-assertion findings remain addressed. No scanner rule was suppressed.

PR provenance follow-up: replaced the manually maintained module allowlist with a deterministic traversal of all COLEMAN packaged code/resources, without importing them. This includes registry metadata, ZIP metadata, temporal contracts and future resource formats. Hidden files, generated bytecode and interpreter caches are excluded. Conservative invalidation means even unrelated packaged changes select a new generation; the guide/release explain this compatibility limit. Two additional transitive regressions reproduced the old digest; all60focused tests and the actual installed three-source Java workflow pass. Exact checkout/wheel byte comparison covers all260packagefiles. No existing JUnit/domain bytes changed.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 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-17T04:08:21.841840Z 8938121 Manual request
ℹ️ 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.

@jacksonpradolima

Copy link
Copy Markdown
Owner Author

@codex review

Review exact head 9b62bb631dfd2a83cdaec8b10f79551ffff74fe1 and the entire main...HEAD diff. Focus on raw/context/normalized evidence correspondence, interruption/completion and offline replay, unchanged legacy contracts, source/fixture curation and scientific limits (including unseeded upstream fixture inputs). All18files received complete local review with Alibaba1.12.13 delegation only; actual real-cache full suite2,671passed/1skip/95.26% on this unchanged head. The installed wheel executed allthree Java sources without principal-component mocks and the prior real CI flows also passed.

Comment thread coleman/transports/junit_matrix.py Fixed
@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 9b62bb631d

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

@jacksonpradolima

Copy link
Copy Markdown
Owner Author

@codex review

Please review exact head 2c2fd9e4f133baf8c20795e8a7feb357df752696 and the full main...HEAD diff after the consolidated review fixes. CLI validation now checks receipt containment within the declared output before reading; two RED→GREEN regressions cover parent traversal and escaping symlinks, with a Path.open spy forbidding external reads. Four duplicated literals were hoisted and the composite assertion split. Other producer logic is AST-equivalent after constant expansion; provenance bytes intentionally change. Entire18file local review repeated, all quality/package/docs/Pylint checks passed, exact unchanged-head full real-cache suite:2,673passed/1skip/95.27% in869.12s, including actual installed three-source matrix/native checkpoints without principal mocks.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 2c2fd9e4f1

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

@jacksonpradolima

Copy link
Copy Markdown
Owner Author

@codex review

Please review the complete PR at exact head 87167b778a2361cb9153dde8292b3a632d3fc6e1. The validation CLI now consumes bounded JSON stdin rather than a receipt filepath. Full local exact-head suite: 2,674 passed, one skip, 13 existing warnings, 95.27% branch-aware coverage; source/HEAD unchanged. All 18 changed files received repeated local delegation/rule/manual review.

@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: 87167b778a

ℹ️ 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 coleman/transports/junit_matrix.py Outdated
@jacksonpradolima

Copy link
Copy Markdown
Owner Author

@codex review

Please review the complete PR at exact head 30f180d97ae97d077e3ecc490d73a3353979bf58. The valid registry-input provenance finding is fixed with three RED regressions, 57 focused GREEN tests and a distinct generation for every changed owned-package dependency. Full local exact-head suite: 2,677 passed, one skip, 13 existing warnings, 95.27% branch-aware coverage; unchanged frozen source. Repeated the complete 18-file local delegation/rule/manual review and all quality checks.

@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: 30f180d97a

ℹ️ 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 coleman/transports/junit_matrix.py Outdated
@jacksonpradolima

Copy link
Copy Markdown
Owner Author

@codex review

Please review the complete PR at exact head 8938121e70c677ff725a144ea27ccb32b6a8a661. The remaining transitive-input finding is fixed by deterministic whole-package resource traversal, replacing the partial module allowlist. Two RED regressions, 60 focused GREEN tests, actual installed three-source Java capture/replay and all260checkout/wheel bytes verified. Full local exact-head suite: 2,680 passed, one skip, 13 existing warnings;95.27% coverage. Full18-file local delegation/rule/manual review and all quality checks repeated.

@sonarqubecloud

Copy link
Copy Markdown

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 8938121e70

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

@jacksonpradolima
jacksonpradolima merged commit 41db9aa into main Oct 17, 2026
34 checks passed
@jacksonpradolima
jacksonpradolima deleted the feat/304-controlled-java-matrix branch October 17, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build a bounded controlled Java real-fault matrix

2 participants