Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/agents/fixlab-autofix.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ only for information that cannot be established safely from the repository.
or create a pull request unless the developer explicitly requests it.

Run verbose repository-owned tests, builds, linters, type checks, and package
validation through `fixlab exec --stage <stage> -- <command> [args...]`. Keep
validation through `fixlab exec --stage <stage> -- <command> [args...]`. In
Windows PowerShell write the separator quoted (`'--'`) because an unquoted `--`
is dropped, and never wrap `fixlab exec` in `cmd /c`; that wrapper is denied in
non-interactive sessions. Keep
the compact result in context and inspect its private evidence only when an
exact diagnostic is needed. Use `--reuse` only for deterministic local
validation with identical command and repository state. Never reuse startup,
Expand Down
5 changes: 4 additions & 1 deletion agents/fixlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ instructions provide authoritative commands.
10. Present evidence, skipped gates, and remaining risks.

Run verbose repository-owned tests, builds, linters, type checks, and package
validation through `fixlab exec --stage <stage> -- <command> [args...]`. Use
validation through `fixlab exec --stage <stage> -- <command> [args...]`. In
Windows PowerShell write the separator quoted (`'--'`) because an unquoted `--`
is dropped, and never wrap `fixlab exec` in `cmd /c`; that wrapper is denied in
non-interactive sessions. Use
its compact result in agent context and refer to the private evidence path only
when an exact diagnostic is needed. Add `--reuse` only for deterministic local
validation when the command, arguments, Git state, working directory, profile,
Expand Down
3 changes: 2 additions & 1 deletion bin/structured-command.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@
const separator = args.indexOf("--");
if (separator < 0 || separator === args.length - 1) {
throw new Error(
"usage: fixlab exec [repository] [--cwd <path>] [--stage <name>] [--reuse] [--timeout-seconds <seconds>] -- <command> [args...]"
"usage: fixlab exec [repository] [--cwd <path>] [--stage <name>] [--reuse] [--timeout-seconds <seconds>] -- <command> [args...]\n" +
"hint: in Windows PowerShell an unquoted -- is dropped; write '--' (quoted) and do not wrap the command in cmd /c."
);
}

Expand Down Expand Up @@ -758,14 +759,14 @@
}
}
};
const child = spawnProcess(executable, spawnedArguments, {
cwd: options.cwd,
env: process.env,
shell: false,
windowsVerbatimArguments: windowsCommandShell,
windowsHide: true,
stdio: ["ignore", "pipe", "pipe"]
});

Check warning

Code scanning / CodeQL

Shell command built from environment values Medium

This shell command depends on an uncontrolled
absolute path
.
This shell command depends on an uncontrolled
absolute path
.
This shell command depends on an uncontrolled absolute path.
This shell command depends on an uncontrolled absolute path.
This shell command depends on an uncontrolled absolute path.
This shell command depends on an uncontrolled absolute path.
This shell command depends on an uncontrolled absolute path.
This shell command depends on an uncontrolled absolute path.
This shell command depends on an uncontrolled absolute path.
This shell command depends on an uncontrolled absolute path.
This shell command depends on an uncontrolled absolute path.
This shell command depends on an uncontrolled absolute path.
This shell command depends on an uncontrolled absolute path.
This shell command depends on an uncontrolled absolute path.
child.stdout.on("data", stdoutCollector.write);
child.stderr.on("data", stderrCollector.write);
child.on("error", (error) => {
Expand Down
5 changes: 4 additions & 1 deletion com.github.copilot/agents/fixlab.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ instructions provide authoritative commands.
10. Present evidence, skipped gates, and remaining risks.

Run verbose repository-owned tests, builds, linters, type checks, and package
validation through `fixlab exec --stage <stage> -- <command> [args...]`. Use
validation through `fixlab exec --stage <stage> -- <command> [args...]`. In
Windows PowerShell write the separator quoted (`'--'`) because an unquoted `--`
is dropped, and never wrap `fixlab exec` in `cmd /c`; that wrapper is denied in
non-interactive sessions. Use
its compact result in agent context and refer to the private evidence path only
when an exact diagnostic is needed. Add `--reuse` only for deterministic local
validation when the command, arguments, Git state, working directory, profile,
Expand Down
2 changes: 1 addition & 1 deletion dashboard/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ ${branchNamingGuidance}
- Autonomously complete the lifecycle without asking the user to direct routine engineering steps.
- ${playwrightOnly ? "Skip source diagnosis, separate reproduction, implementation, diff review, and non-browser validation. Mark diagnosis, reproduce, fix, and review skipped with the reason Playwright-only mode was selected." : "Inspect the affected surface, implement the smallest required code when edits are allowed, and self-review the effective diff for correctness, scope, and unrelated changes."}
- ${playwrightOnly ? "Run only setup commands strictly required to launch the profile-defined applications and focused Playwright journey. Do not reinstall dependencies that are already available." : "Run the focused repository-owned tests, type-checks, and builds needed for the affected surface and risk. Preserve exact results."}
- Run verbose repository-owned tests, builds, linters, type checks, and package validation through \`fixlab exec --stage <stage> -- <command> [args...]\`. Keep its compact result in context and inspect the private evidence path only when an exact diagnostic is needed.
- Run verbose repository-owned tests, builds, linters, type checks, and package validation through \`fixlab exec --stage <stage> -- <command> [args...]\`. In Windows PowerShell quote the separator (\`'--'\`) because an unquoted \`--\` is dropped, and never wrap \`fixlab exec\` in \`cmd /c\`; that wrapper is denied in non-interactive sessions. Keep its compact result in context and inspect the private evidence path only when an exact diagnostic is needed.
- Add \`--reuse\` only for deterministic local validation when command, arguments, Git state, working directory, profile, and stage are unchanged. Never reuse startup, health, authentication, Playwright or live-environment validation, external-data checks, dependency installation, deployments, or mutating commands.
- Do not skip Playwright merely because an unrelated non-browser test, build, or backend startup is failed or blocked. If frontend startup, authentication, safe data, and the selected browser journey are independently ready, run the live-test gate and preserve the other blocker separately.
- Use local-stack only for profile-defined application startup and health. Do not mark local-stack failed because a separate test, type-check, lint, or production build reports unrelated baseline diagnostics; preserve that exact validation limitation separately and continue browser execution when startup is healthy.
Expand Down
9 changes: 9 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ repository:
fixlab exec --cwd .\frontend --stage test -- npm test
```

In Windows PowerShell an unquoted `--` is dropped, so `fixlab exec` prints its
usage text instead of running. Quote the separator (`'--'`). Do not wrap the
command in `cmd /c`: the wrapper is denied when no interactive user can approve
it, which blocks the job.
Comment on lines +15 to +18

```powershell
fixlab exec --cwd .\frontend --stage test '--' npm test
```

The `Evidence:` path is Git-private and contains redacted `stdout.log`,
`stderr.log`, and `result.json`. A missing stream file means that stream was
empty. The terminal `Context:` line and `result.json.context` report raw and
Expand Down
5 changes: 4 additions & 1 deletion templates/fixlab-autofix.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ only for information that cannot be established safely from the repository.
or create a pull request unless the developer explicitly requests it.

Run verbose repository-owned tests, builds, linters, type checks, and package
validation through `fixlab exec --stage <stage> -- <command> [args...]`. Keep
validation through `fixlab exec --stage <stage> -- <command> [args...]`. In
Windows PowerShell write the separator quoted (`'--'`) because an unquoted `--`
is dropped, and never wrap `fixlab exec` in `cmd /c`; that wrapper is denied in
non-interactive sessions. Keep
the compact result in context and inspect its private evidence only when an
exact diagnostic is needed. Use `--reuse` only for deterministic local
validation with identical command and repository state. Never reuse startup,
Expand Down
1 change: 1 addition & 0 deletions test/dashboard-server.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,7 @@ test("dashboard parses complete stage markers and passes a job", async () => {
assert.match(receivedPrompt, /commit changes and repository-profile or instruction changes as invalidation boundaries/i);
assert.match(receivedPrompt, /do not feed unbounded raw output back into prompts/i);
assert.match(receivedPrompt, /fixlab exec --stage <stage>/i);
assert.match(receivedPrompt, /never wrap `fixlab exec` in `cmd \/c`/u);
assert.match(receivedPrompt, /Never reuse startup, health, authentication/i);
assert.match(receivedPrompt, /FIXLAB_STAGE\|stage\|status\|message/);
assert.match(receivedPrompt, /FIXLAB_BUG\|id\|outcome\|owner\|summary/);
Expand Down
6 changes: 5 additions & 1 deletion test/structured-command.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,11 @@ test("structured command arguments enforce repository containment", () => {
);
assert.throws(
() => parseStructuredCommandArguments([repository, process.execPath]),
/usage: fixlab exec/
/usage: fixlab exec[\s\S]*quoted/u
);
assert.throws(
() => parseStructuredCommandArguments([repository, process.execPath]),
/do not wrap the command in cmd \/c/u
);
assert.throws(
() =>
Expand Down
Loading