fix(core): reject module nodes with source fields - #2911
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
Automated review by Claude. No issues found.
🤖 This is a fully automated review by Claude (Claude Code). No human has vetted these findings — please verify before acting on them. Generated by Claude Code Generated by Claude Code |
|
Note Automated review by Claude — fully automated review, no human has verified these findings. The conflict check is incomplete: it rejects
The two-scenario test is otherwise meaningful (covers Generated by Claude Code |
b5c982e to
a6588cf
Compare
|
Automated review by Claude — fully automated; not vetted by a human. The latest revision addresses my earlier point: Generated by Claude Code |
|
Automated review by Claude — this is a fully automated review with no human in the loop; please verify before acting. (Reviewing the field-validation code added in the latest commit, which post-dates the previous review.) I found the following issue:
Minor (not correctness): with Generated by Claude Code |
|
🤖 Automated review by Claude — this is a fully automated review, with no human in the loop. The latest revision only adds a formatting-only commit (
NodeKind::Module(_) => {
unreachable!("module node must be expanded before resolution");
}
Since Minor (also noted previously): in Generated by Claude Code |
|
Follow-up review of the new commit It resolves both issues raised earlier:
I re-read the resulting diff and found no new issues. The latest commit looks safe to merge with respect to those two points. Disclaimer: this is a fully automated review by Claude — no human has verified these findings. Please double-check before relying on them. Generated by Claude Code |
961360e to
d72c4cb
Compare
|
🤖 Fully automated review by Claude — no human has vetted this. Treat findings as suggestions to verify. The latest revision correctly resolves the two issues raised earlier (the
NodeKind::Standard(_) => {
if !node.output_metadata.is_empty() {
conflicts.push("output_metadata");
}
if node.pattern.is_some() {
conflicts.push("pattern");
}
...
}
- id: server
path: server.py
outputs: [response]
pattern: service-servernow fails with Relatedly, the added test The same rejection on the Generated by Claude Code |
The diff changed substantially since the last automated review — commit Node-level
Net effect: a service/action node written via Worth noting for whichever direction you choose: I traced the resolution path and both Standard and Custom nodes resolve into Generated by Claude Code |
|
🤖 Fully automated review by Claude — no human has vetted this. Please verify before acting. Re-flagging after the newest commit. The Custom-node reasoning applies equally to ROS2 bridge nodes:
So a ROS2 bridge (or Custom) node using the documented Either the Generated by Claude Code |
phil-opp
left a comment
There was a problem hiding this comment.
Thanks for this — validate_module_node_fields is the right shape, and running it inside expand_module_node means nested module nodes are covered for free. Asking for the scope to come down, plus one design decision that's since been settled the other way.
env and build propagate — they shouldn't be errors
I've approved #2905 (module node env propagates to inner nodes) and #2908 (module-level build: reaches operators[]/operator/custom inner kinds). #2908 exists because resolution drops node-level build for those kinds, so a module-level build: was silently never running — rejecting the field would re-bury that, and docs/modules.md documents it.
Please narrow this to what the title already says: source fields. path, git, operator, operators, custom have no meaning on a module node; env and build do. Concretely, drop the invalid-module-env.yml and invalid-module-build.yml cases.
Blocking
-
Unrelated revert. The diff deletes the
health_check_timeout"post-connection liveness only" doc clarification inlibraries/message/src/descriptor.rs(two places) that's currently onmain. Looks like a stale-rebase artifact — please rebase and drop both hunks. -
pattern/output_metadatafalse-rejected forcustom:andros2:.check_metadata_annotationsinlibraries/core/src/descriptor/validate.rsreads them at node level for every kind, and neitherCustomNodenorRos2BridgeConfighas anywhere else to put them. This works today and hard-errors after the PR:- id: server custom: { path: server.py, source: Local } pattern: service-server
tests/descriptor-validation/cases/invalid-custom-metadata.ymlandinvalid-ros2-metadata.ymlcurrently pin the regression as intended. -
The tests never run.
tests/descriptor-validation.rslands in the rootdora-examplespackage (Cargo.toml:189), excluded fromcargo test --allat.github/workflows/ci.yml:233and in nightly. All 666 lines and 33 fixtures are dead in CI — please move tolibraries/core/tests/. (Note PR CI doesn't runcargo testat all; tests run in the merge queue, so the green check here says nothing about them.) -
descriptor_should_pass()is vacuous. It only fails on"not supported"/"mutually exclusive"text, so a parse failure counts as a pass — and the sixcustom_merges_node_level_*cases rely on it exclusively. Please assertOkdirectly. -
path_sha256in the custom merge is a trust-boundary change. A presentpath_sha256makes the daemon fetchpathas a URL download regardless of confinement, so a previously-inert field would change how the binary is obtained. Drop it from the merge or split it out.
Please strip
~40 of the 48 files aren't part of the fix: docs/superpowers/bugs/bug-005-summary.md and issue-plan-c-node-enum.md, tests/bug-005-silent-drop/ (referenced by nothing), and the CLAUDE.md hunk — that one adds a "run cargo clean after every bug fix" rule which is wrong for this workspace, since all worktrees share one target dir. A PR body and a linked issue would help too, given this is a breaking descriptor change.
Two asks for the narrowed version
Split it into (a) the module-node source-field deny-list, and (b) the BUG-005 custom-merge plus per-kind resolution deny-list — separate breaking changes, separate review.
Add an "examples still resolve" test: loop over examples/**/*.yml, expand + resolve_aliases_and_set_defaults, assert Ok. I scanned all 767 in-repo node blocks against your deny-lists and nothing breaks today — worth pinning that it stays true.
On the series
This is one of twelve PRs (#2901, #2903–#2913) all editing expand.rs from the same base, with four-way conflicts at two anchors — and #2906/#2907 define the same function name with different bodies, so they won't compile together even after a clean git merge. Would you be willing to squash them into three: linter checks, expand-time validation, expand-time propagation? Landing them one at a time means nine rebases, and each rebase re-orders validation, which changes which error a test sees. Happy to help sequence it either way.
Last thing: since these turn previously-ignored config into hard errors, could you add a changelog entry? A release of tracing::warn! on the dora run path before hard-failing would be kinder to existing users — dora check can reject immediately.
94058f8 to
5b64319
Compare
|
Updated this PR to narrow the scope back to the module-node source-field check only.
I also dropped the broader descriptor-field / silent-drop work from this PR. |
|
🤖 Automated review by Claude — fully automated review; no human has verified these findings. The PR has been narrowed to a single commit that touches only Re-reviewing the current diff, no issues found:
The latest revision looks safe. Generated by Claude Code |
No description provided.