Skip to content

Test causal connector direction against input/output metadata - #5298

Draft
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/causal-connector-test-direction
Draft

ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix/causal-connector-test-direction

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

🚧 UNREVIEWED — Ignore this PR until reviewed by @ChrisRackauckas.
🤖 This PR was prepared by an AI agent; Chris has not reviewed it.

InterfaceI fails its causal-connector assertion because it expects output ~ input, while connection expansion produces input ~ output. The assertion now checks that direction and independently verifies that its left side has input metadata and its right side has output metadata. Production code is unchanged. The same assertion fails in the current MTK downstream check on JuliaSymbolics/SymbolicUtils.jl#1169 .

The original causal-connector feature tested this direction; a later test-only edit reversed the expectation while retaining the opposite comment. Correcting sentinel comparisons in #5295 made the stale assertion observable. The added metadata predicates check the contract independently of the observed printed equation. Both predicates are public owner APIs.

Verification

Julia 1.13.2, four threads and precompile tasks, one BLAS/OMP thread. Both runs used the same isolated environment developing this repository and its local sublibraries:

GROUP=InterfaceI julia --startup-file=no --check-bounds=yes --project="$VALIDATION_ENV" -e 'using Pkg; Pkg.test("ModelingToolkitBase")'

Unmodified base 207f39e2d3c63d87e9ecde21279ec6967e4e8b21, exit 1:

ERROR: LoadError: Some tests did not pass: 1802 passed, 1 failed, 0 errored, 5 broken.
InterfaceI | 1802  1  5  1808  35m00.6s

With this exact three-line test change, exit 0:

InterfaceI | 1805  5  1810  27m31.9s
Testing ModelingToolkitBase tests passed

Official QA:

ulimit -n 65536
GROUP=QA julia --startup-file=no --check-bounds=yes --project="$VALIDATION_ENV" -e 'using Pkg; Pkg.test("ModelingToolkitBase")'
JET Tests  | 54  54  51.9s
Aqua Tests | 21  21  5m48.5s
Testing ModelingToolkitBase tests passed

The first QA attempt passed JET 54/54 and reached Aqua 20 pass/1 error, failing with FolderMonitor(start): too many open files (EMFILE). The identical command passed on retry with the child file-descriptor limit above. This does not establish the limit as the cause of the transient failure. No test was disabled or weakened. Runic, spelling over the diff, and whitespace checks passed. Docs, GPU, Everything, and unrelated downstream suites were not run for this test-only change.

CI completed with 99 successful checks, seven failures and three skipped checks. Recorded same-head comparisons match all seven failures to default 207f39e2d3: five Optimization jobs share UnsupportedNonlinearOperator(:literal_pow), downstream indexing shares the one-element-vector state-coordinate BoundsError, and SciMLSensitivity Core8 shares mtk.jl:216's 3600-element interval-vector access at3601. Core8 counts differ (PR208pass/1error versus default205pass/2errors); the classification concerns the shared failure, not identical full-suite results. PR Core8 job, matching default job. Existing investigations and fixes are linked below; their full downstream suites were not rerun with those fixes. No all-green CI claim is made.

Independent review

Fresh Codex CLI 0.163.0 / gpt-6.1-sol reviewer: APPROVE, low risk, high confidence; no blocking findings for exact commit 2c870917f06268e9ac844015e0385657d0588492. The reviewer recorded provisional risk before reading author reports, independently inspected the original feature/source/test history and connector metadata, and reran the exact testset from clean archives with all six local path dependencies relocated.

Julia 1.13.2, clean baseline archive: 1 passed, 1 failed, exit 1
Julia 1.13.2, clean patched archive: 4/4 passed, exit 0

Full InterfaceI/QA were inspected in raw author logs, not independently repeated. The reviewer independently passed diff spelling and whitespace checks; Runic success is author evidence. An existing scalar connect docstring direction discrepancy is outside this test patch and does not change the source/history contract. No runtime bug-fix claim is made.

Reviewer thread: local thread 01a15d51-24f8-7ca2-9cb5-0a6533099a35; outer local session 01a15ca3-5696-7ea3-bbac-ba551b6975af (no session URL exposed).

Links

Risk assessment

  • Risk: low
  • Blast radius: one ModelingToolkitBase testset; no production or public API changes.
  • Evidence: official failing-before/passing-after InterfaceI and passing QA above; fresh clean archived testset failing before/passing after.
  • Independent review: Codex CLI 0.163.0 / gpt-6.1-sol rated low risk, high confidence: independent contract/history checks and clean 1pass/1fail to4pass control; no blocking findings (independent review).
  • Merge: auto-merge candidate once CI introduces no regressions and parent policy is satisfied; this is a test-only change with a clean independent low-risk rating.

🤖 Generated by an AI agent — harness: Codex CLI 0.163.0 · model: gpt-6.1-sol
Author conversation: local session 01a15cac-cfc9-7a93-b5cd-c60ba1c32c71 (no session URL).
Conversation: local session 01a15ca3-5696-7ea3-bbac-ba551b6975af (no session URL exposed).

Check the equation direction against input/output connector metadata.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex CLI 0.163.0
Agent-Model: gpt-6.1-sol
Agent-Session: local session 01a15cac-cfc9-7a93-b5cd-c60ba1c32c71 (no session URL)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants