Skip to content

fix: restrict missing component attributes to declared I/O fields - #301

Open
toby-coleman wants to merge 2 commits into
mainfrom
fix/declared-io-attribute-lookup
Open

toby-coleman wants to merge 2 commits into
mainfrom
fix/declared-io-attribute-lookup

Conversation

@toby-coleman

@toby-coleman toby-coleman commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Reading an unknown public component attribute currently returns None, so misspelled fields also appear to exist through hasattr. Restrict that fallback to declared public inputs and outputs on the instance's current IOController. Unknown attributes now raise AttributeError with the component class, instance name, and field name.

Declared-but-unset ports continue returning None without assigning a value or making inputs ready. Explicitly assigning None retains an instance attribute. Runtime declarations from FileReader and FileWriter follow the same rules as static and inherited ports. Document this contract and add regression coverage for attribute lookup, dynamic instance isolation, initialization, export/reconstruction, and deepcopy.

Preserve the helpful ValidationError for components that omit super().init(). The missing name is now detected when the component ID is accessed during process construction, rather than later during process initialization.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 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-20T20:33:09.573266Z 8730688 New commits
ℹ️ 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.

@github-actions

Copy link
Copy Markdown

Benchmark comparison for 2cf84111 (base) vs d6b076d8 (PR)


------------------------------------------------------------------------------------------------------------------ benchmark: 2 tests -----------------------------------------------------------------------------------------------------------------
Name (time in ms)                                                                         Min                 Max                Mean            StdDev              Median               IQR            Outliers     OPS            Rounds  Iterations
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_benchmark_process_run (main/.benchmarks/Linux-CPython-3.14-64bit/0001_base)     385.3478 (1.0)      400.3043 (1.01)     391.6252 (1.00)     5.8029 (1.92)     390.6266 (1.0)      8.2365 (3.28)          2;0  2.5535 (1.00)          5           1
test_benchmark_process_run (pr/.benchmarks/Linux-CPython-3.14-64bit/0001_pr)         387.3781 (1.01)     395.7767 (1.0)      391.0311 (1.0)      3.0179 (1.0)      390.7754 (1.00)     2.5088 (1.0)           2;0  2.5573 (1.0)           5           1
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean

@github-actions

Copy link
Copy Markdown

Benchmark comparison for 2cf84111 (base) vs 8730688d (PR)


------------------------------------------------------------------------------------------------------------------ benchmark: 2 tests -----------------------------------------------------------------------------------------------------------------
Name (time in ms)                                                                         Min                 Max                Mean            StdDev              Median               IQR            Outliers     OPS            Rounds  Iterations
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_benchmark_process_run (main/.benchmarks/Linux-CPython-3.14-64bit/0001_base)     372.6211 (1.0)      379.4071 (1.0)      377.4284 (1.0)      2.7990 (1.17)     378.7255 (1.0)      2.9771 (1.36)          1;0  2.6495 (1.0)           5           1
test_benchmark_process_run (pr/.benchmarks/Linux-CPython-3.14-64bit/0001_pr)         388.3939 (1.04)     394.6805 (1.04)     390.6270 (1.03)     2.3927 (1.0)      390.1824 (1.03)     2.1889 (1.0)           1;0  2.5600 (0.97)          5           1
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean

@codecov

codecov Bot commented Oct 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

Development

Successfully merging this pull request may close these issues.

1 participant