-
Notifications
You must be signed in to change notification settings - Fork 69
fix(wails3): forward task, and report inputs no caller can reach
#81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -150,15 +150,28 @@ def main() -> int: | |
| # the output. Reach for `--asymmetries` when wiring a new stack or hunting | ||
| # an option that appears to do nothing. | ||
| asymmetries: list[str] = [] | ||
| # Inputs no caller wires at all. The asymmetry report cannot show these — | ||
| # it compares callers against each other, and unanimous silence looks like | ||
| # agreement — yet they are the worse case: the option exists on the callee, | ||
| # is documented there, and cannot be reached through the caller at all. A | ||
| # workflow that sets one gets no error, because Actions ignores an unknown | ||
| # `with:` key. That is how `task` reached the wails3 stack and never left | ||
| # the root action, pinning every v3 build to <os>:build. | ||
| unreachable: list[str] = [] | ||
| for callee, inputs in sorted(wiring.items()): | ||
| for name, callers in sorted(inputs.items()): | ||
| missing = sorted(c for c, ok in callers.items() if not ok) | ||
| if missing and len(missing) != len(callers): | ||
| has = sorted(c for c, ok in callers.items() if ok) | ||
| asymmetries.append( | ||
| f" {callee} :: {name}\n" | ||
| f" wired by {', '.join(has)}\n" | ||
| f" not by {', '.join(missing)}") | ||
| if not missing: | ||
| continue | ||
| if len(missing) == len(callers): | ||
| unreachable.append(f" {callee} :: {name}\n" | ||
| f" reached by no caller ({', '.join(missing)})") | ||
|
Comment on lines
163
to
+168
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== repo files =="
git ls-files | sed -n '1,120p'
echo "== locate action_contracts.py and action.yml =="
fd -a 'action_contracts.py|action.yml' . | sed 's#^\./##'
echo "== relevant sections =="
if [ -f tests/action_contracts.py ]; then
wc -l tests/action_contracts.py
sed -n '120,190p' tests/action_contracts.py | cat -n
fi
echo "== workflow and action references =="
rg -n "forward|forwarded|inputs|uses:.*action|action.yml|task" -S . --glob '!node_modules' --glob '!dist' --glob '!build' | sed -n '1,240p'Repository: dAppCore/build Length of output: 29282 Do not treat missing callee inputs as reachable. The contract checker currently records reachability from 🤖 Prompt for AI AgentsSource: MCP tools |
||
| continue | ||
| has = sorted(c for c, ok in callers.items() if ok) | ||
| asymmetries.append( | ||
| f" {callee} :: {name}\n" | ||
| f" wired by {', '.join(has)}\n" | ||
| f" not by {', '.join(missing)}") | ||
|
|
||
| if problems: | ||
| print("\n".join(f" {p}" for p in problems)) | ||
|
|
@@ -170,9 +183,12 @@ def main() -> int: | |
| print(f"\n{len(asymmetries)} input(s) wired by some callers of a callee " | ||
| f"and not others:\n") | ||
| print("\n".join(asymmetries)) | ||
| elif asymmetries: | ||
| print(f"({len(asymmetries)} caller asymmetries — " | ||
| f"run with --asymmetries to list them)") | ||
| print(f"\n{len(unreachable)} input(s) no caller wires — settable on the " | ||
| f"callee, unreachable through it:\n") | ||
| print("\n".join(unreachable)) | ||
| elif asymmetries or unreachable: | ||
| print(f"({len(asymmetries)} caller asymmetries, {len(unreachable)} " | ||
| f"unreachable inputs — run with --asymmetries to list them)") | ||
| return 0 | ||
|
|
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: dAppCore/build
Length of output: 1358
🏁 Script executed:
Repository: dAppCore/build
Length of output: 19727
🌐 Web query:
GitHub Actions composite actions with key not declared in inputs ignored documentation💡 Result:
In GitHub Actions, composite actions do not automatically create INPUT_<VARIABLE_NAME> environment variables for their inputs, unlike Docker or JavaScript actions [1][2]. Consequently, if an input is passed to a composite action but is not declared in its metadata (the action.yml file), the action has no native way to access that undeclared input via the inputs context [1][3]. Key technical points regarding this behavior: 1. Absence of Automatic Env Vars: Composite actions do not receive input values as environment variables automatically [1][4]. Authors must explicitly map inputs to environment variables within the steps section of the action.yml file if they wish to access them as environment variables [5][6]. 2. Declaration Requirement: Because composite actions rely on the inputs context to access values, an input must be explicitly defined in the inputs section of the metadata [1][7]. If a user provides an input that is not declared in the action's metadata, that value is effectively ignored by the action logic [7]. The action cannot dynamically "see" or reference inputs that were not part of its design [7]. 3. Recommended Practice: To use inputs within a composite action, you must declare them in the metadata and then explicitly map them into each step where they are required, either by direct reference using ${{ inputs.input-id }} or by defining them in the env block of the specific step [5][6]. If you are encountering issues where inputs are being ignored, ensure they are declared in your action.yml file and correctly passed through the steps as shown in official documentation [6][8]. Using linting tools or static analysis, such as eslint-plugin-github-actions, can help detect references to undeclared inputs that would otherwise cause failures or incorrect behavior at runtime [7].
Citations:
Complete
taskpropagation through both composite-action boundaries.taskis declared on the root action, but the root does not pass it toactions/action.yml; the orchestrator forwards it to the Wails v3 wrapper but declares notaskinput, so composite-action metadata treats it as absent andactions/build/wails3/buildresolves to the<os>:buildfallback.action.yml: includetask: ${{ inputs.task }}in the directory-orchestratorwith:block.actions/action.yml: declaretaskin the orchestratorinputsblock before forwarding it to the Wails v3 wrapper.📍 Affects 2 files
action.yml#L66-L72(this comment)actions/action.yml#L175-L180🤖 Prompt for AI Agents
Source: MCP tools