Skip to content

feat: triage variable to control auto-coding - #331

Open
deboer-tim wants to merge 2 commits into
fullsend-ai:mainfrom
deboer-tim:triage-auto-code
Open

feat: triage variable to control auto-coding#331
deboer-tim wants to merge 2 commits into
fullsend-ai:mainfrom
deboer-tim:triage-auto-code

Conversation

@deboer-tim

@deboer-tim deboer-tim commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Adds a new variable to the triage agent that allows you to control whether it automatically triggers the coding agent. With the variable set to true (default) you get the current behaviour: the issue is labelled as ready-to-code, which triggers the coding agent automatically. When the variable is set to false, issues will be marked with triaged instead, and a human (or alternate agent) can decide when to add the ready-to-code label or /fs-code comment.

Fixes fullsend-ai/fullsend#1750.

Adds a new variable to the triage agent that allows you to control
whether it automatically triggers the coding agent. With the variable
set to true (default) you get the current behaviour: the issue is
labelled as `ready-to-code`, which triggers the coding agent
automatically. When the variable is set to false, issues will be
marked with `triaged` instead, and a human (or alternate agent) can
decide when to add the `ready-to-code` label or `/fs-code` comment.

Fixes #1750.

Signed-off-by: Tim deBoer <git@tdeboer.ca>
@deboer-tim
deboer-tim requested a review from a team as a code owner July 21, 2026 11:54
@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown

Functional tests did not run

The ok-to-test label was removed because new commits landed after it was applied. A maintainer must re-apply ok-to-test after reviewing the latest changes.

Note: ok-to-test was cleared due to new commits.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Add TRIAGE_AUTO_CODE flag to gate ready-to-code promotion

✨ Enhancement 🧪 Tests 📝 Documentation ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Add TRIAGE_AUTO_CODE to toggle automatic ready-to-code labeling for low-risk issues.
• Wire the variable through the triage harness/env and update post-triage label application.
• Document the new setting and add regression tests for the disabled auto-code path.
Diagram

graph TD
  A["CI workflow env"] --> B["env/triage.env"] --> C["harness/triage.yaml"] --> D["Triage sandbox run"] --> E["scripts/post-triage.sh"] --> F{Auto-code?}
  F -->|"TRIAGE_AUTO_CODE=true"| G["Apply ready-to-code"] --> H{{"Code agent trigger"}}
  F -->|"TRIAGE_AUTO_CODE=false"| I["Apply triaged"]
  E --> J{{"GitHub issue labels"}}

  subgraph Legend
    direction LR
    _file["File/config"] ~~~ _dec{Decision} ~~~ _ext{{External/trigger}}
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Triage-result field (schema-driven)
  • ➕ Makes the auto-code decision explicit in agent output, not inferred from env
  • ➕ Potentially easier to audit/debug per-issue decisions
  • ➖ Requires schema changes + agent prompt updates + validation loop updates
  • ➖ More invasive than an env-level feature flag for a workflow concern
2. Configurable allowlist of auto-code categories
  • ➕ More flexible than a boolean (e.g., allow auto-code for docs but not bugs)
  • ➕ Avoids future PRs for category-by-category policy tweaks
  • ➖ More configuration surface area (parsing/validation) for a small initial need
  • ➖ Harder to document and test exhaustively compared to a single flag

Recommendation: Keep the env-var feature flag approach: it’s the lowest-friction control point for CI policy and preserves current default behavior (true). If teams ask for finer policy control, evolve this into a category allowlist; avoid a schema-level change unless the decision must be persisted in the triage result for downstream consumers.

Files changed (5) +110 / -6

Enhancement (1) +26 / -6
post-triage.shGate ready-to-code promotion behind TRIAGE_AUTO_CODE +26/-6

Gate ready-to-code promotion behind TRIAGE_AUTO_CODE

• Adds 'TRIAGE_AUTO_CODE' (defaulting to true) and updates the sufficient-action label logic so bug/documentation/performance categories apply 'triaged' instead of deferring 'ready-to-code' when auto-coding is disabled.

scripts/post-triage.sh

Tests (1) +72 / -0
post-triage-test.shAdd tests for TRIAGE_AUTO_CODE=false label outcomes +72/-0

Add tests for TRIAGE_AUTO_CODE=false label outcomes

• Introduces a helper to run post-triage with 'TRIAGE_AUTO_CODE=false' and asserts that bug/docs/perf categories receive 'triaged' (and not 'ready-to-code') while still applying their category labels where applicable.

scripts/post-triage-test.sh

Documentation (1) +10 / -0
triage.mdDocument TRIAGE_AUTO_CODE variable and behavior +10/-0

Document TRIAGE_AUTO_CODE variable and behavior

• Adds a Variables section documenting 'TRIAGE_AUTO_CODE', its default ('true'), and how it switches low-risk issues between 'ready-to-code' and 'triaged'. Includes guidance on setting it in the CI workflow env and how it propagates to the pipeline.

docs/triage.md

Other (2) +2 / -0
triage.envExport TRIAGE_AUTO_CODE with default true +1/-0

Export TRIAGE_AUTO_CODE with default true

• Exports 'TRIAGE_AUTO_CODE' from the env file with a 'true' default, ensuring it is available to the sandbox/harness without extra configuration.

env/triage.env

triage.yamlPass TRIAGE_AUTO_CODE into the runner environment +1/-0

Pass TRIAGE_AUTO_CODE into the runner environment

• Wires 'TRIAGE_AUTO_CODE' into the forge runner env so the post-triage script can read it from the runner environment.

harness/triage.yaml

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (1)

Context used
✅ Compliance rules (platform): 55 rules
✅ Skills: 4 invoked
  code-review
  code-implementation
  pr-review
  docs-review

Grey Divider


Action required

1. Protected paths modified 📜 Skill insight § Compliance
Description
This PR changes protected governance/infrastructure paths (scripts/, harness/) which require
explicit human review and must not be auto-approved. Merging without the required approval controls
increases risk of unintended workflow/automation changes.
Code

scripts/post-triage.sh[R315-332]

+    #
+    # Set TRIAGE_AUTO_CODE=false to disable the automatic ready-to-code
+    # promotion. When disabled, low-risk categories receive "triaged" instead,
+    # requiring human review before the code agent runs.
+    TRIAGE_AUTO_CODE="${TRIAGE_AUTO_CODE:-true}"
    CATEGORY=$(jq -r '.triage_summary.category // "unknown"' "${RESULT_FILE}")
    echo "Category: ${CATEGORY}"
    case "${CATEGORY}" in
      bug)
        echo "Applying bug label..."
        add_label "bug"
-        echo "Deferring ready-to-code label (${CATEGORY}) until after label_actions..."
-        DEFERRED_LABEL="ready-to-code"
+        if [[ "${TRIAGE_AUTO_CODE}" == "false" ]]; then
+          echo "TRIAGE_AUTO_CODE=false — applying triaged label instead of ready-to-code (${CATEGORY})"
+          add_label "triaged"
+        else
+          echo "Deferring ready-to-code label (${CATEGORY}) until after label_actions..."
+          DEFERRED_LABEL="ready-to-code"
+        fi
Relevance

⭐⭐ Medium

Similar protected-path review/gating suggestions were only partially accepted or undetermined (e.g.,
workflow protected-path note in PR184).

PR-#184
PR-#59
PR-#29

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
PR Compliance ID 1538392 requires raising a finding whenever protected governance/infrastructure
paths are modified. The diff includes changes under scripts/ and harness/, which are explicitly
listed as protected paths.

scripts/post-triage.sh[311-352]
harness/triage.yaml[37-48]
scripts/post-triage-test.sh[495-566]
Skill: pr-review

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The PR modifies protected governance/infrastructure paths (e.g., `scripts/`, `harness/`), which must not be auto-approved and require explicit human review per policy.

## Issue Context
Protected paths can impact CI/CD, automation, and repo governance. Ensure the PR is gated by the required human/owner review controls before merging.

## Fix Focus Areas
- scripts/post-triage.sh[315-332]
- harness/triage.yaml[37-48]
- scripts/post-triage-test.sh[495-566]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Unvalidated auto-code flag 🐞 Bug ☼ Reliability
Description
scripts/post-triage.sh treats any TRIAGE_AUTO_CODE value other than the exact string "false" as
enabled, so typos/case variants (e.g., "FALSE", "0", "fasle") will still apply "ready-to-code" and
can unintentionally trigger the coding agent.
Code

scripts/post-triage.sh[R319-332]

+    TRIAGE_AUTO_CODE="${TRIAGE_AUTO_CODE:-true}"
    CATEGORY=$(jq -r '.triage_summary.category // "unknown"' "${RESULT_FILE}")
    echo "Category: ${CATEGORY}"
    case "${CATEGORY}" in
      bug)
        echo "Applying bug label..."
        add_label "bug"
-        echo "Deferring ready-to-code label (${CATEGORY}) until after label_actions..."
-        DEFERRED_LABEL="ready-to-code"
+        if [[ "${TRIAGE_AUTO_CODE}" == "false" ]]; then
+          echo "TRIAGE_AUTO_CODE=false — applying triaged label instead of ready-to-code (${CATEGORY})"
+          add_label "triaged"
+        else
+          echo "Deferring ready-to-code label (${CATEGORY}) until after label_actions..."
+          DEFERRED_LABEL="ready-to-code"
+        fi
Relevance

⭐⭐⭐ High

Team has accepted env-var parsing hardening to avoid fail-open behavior (SCRIBE_MIN_CONFIDENCE
validation in PR10).

PR-#10

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The documentation constrains TRIAGE_AUTO_CODE to true/false, but the implementation only checks
for the exact lowercase string false and otherwise proceeds with the auto-coding path.

docs/triage.md[131-139]
scripts/post-triage.sh[315-352]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`TRIAGE_AUTO_CODE` is documented as a boolean (`true`/`false`) but is only checked via `[[ "${TRIAGE_AUTO_CODE}" == "false" ]]`. Any other value (including common misconfigurations like `FALSE`) silently behaves like `true`, potentially auto-applying `ready-to-code`.

### Issue Context
- Docs state valid values are strictly `true` and `false`.
- The post-triage script currently defaults to enabled for all non-exact-false values.

### Fix Focus Areas
- scripts/post-triage.sh[319-352]
- docs/triage.md[131-139]

### Proposed fix
1. Normalize the value (e.g., lowercase) and validate explicitly:
  - `TRIAGE_AUTO_CODE="${TRIAGE_AUTO_CODE:-true}"`
  - `TRIAGE_AUTO_CODE="${TRIAGE_AUTO_CODE,,}"`
  - `case "${TRIAGE_AUTO_CODE}" in true|false) ;; *) echo "ERROR: TRIAGE_AUTO_CODE must be true|false"; exit 1 ;; esac`
2. Keep the existing branching logic, but now it can rely on a known-good value.
3. (Optional) Mention in docs that values are case-sensitive unless normalization is implemented.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment thread scripts/post-triage.sh
Comment thread scripts/post-triage.sh
# Set TRIAGE_AUTO_CODE=false to disable the automatic ready-to-code
# promotion. When disabled, low-risk categories receive "triaged" instead,
# requiring human review before the code agent runs.
TRIAGE_AUTO_CODE="${TRIAGE_AUTO_CODE:-true}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

2. Unvalidated auto-code flag 🐞 Bug ☼ Reliability

scripts/post-triage.sh treats any TRIAGE_AUTO_CODE value other than the exact string "false" as
enabled, so typos/case variants (e.g., "FALSE", "0", "fasle") will still apply "ready-to-code" and
can unintentionally trigger the coding agent.
Agent Prompt
### Issue description
`TRIAGE_AUTO_CODE` is documented as a boolean (`true`/`false`) but is only checked via `[[ "${TRIAGE_AUTO_CODE}" == "false" ]]`. Any other value (including common misconfigurations like `FALSE`) silently behaves like `true`, potentially auto-applying `ready-to-code`.

### Issue Context
- Docs state valid values are strictly `true` and `false`.
- The post-triage script currently defaults to enabled for all non-exact-false values.

### Fix Focus Areas
- scripts/post-triage.sh[319-352]
- docs/triage.md[131-139]

### Proposed fix
1. Normalize the value (e.g., lowercase) and validate explicitly:
   - `TRIAGE_AUTO_CODE="${TRIAGE_AUTO_CODE:-true}"`
   - `TRIAGE_AUTO_CODE="${TRIAGE_AUTO_CODE,,}"`
   - `case "${TRIAGE_AUTO_CODE}" in true|false) ;; *) echo "ERROR: TRIAGE_AUTO_CODE must be true|false"; exit 1 ;; esac`
2. Keep the existing branching logic, but now it can rely on a known-good value.
3. (Optional) Mention in docs that values are case-sensitive unless normalization is implemented.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@rh-hemartin

Copy link
Copy Markdown
Member

/fs-review

@rh-hemartin rh-hemartin self-assigned this Jul 21, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Jul 21, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 1:20 PM UTC · Completed 1:35 PM UTC
Commit: 7ada4e0 · View workflow run →

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

Medium

  • [stale-doc] docs/code.md:41 — The control labels table describes ready-to-code as unconditionally "Applied by the triage post-script for low-risk categories (bug, documentation, performance)." This is now conditional on TRIAGE_AUTO_CODE=true (the default). When TRIAGE_AUTO_CODE=false, low-risk categories receive triaged instead.
    Remediation: Update the ready-to-code row in docs/code.md to note the conditional behavior and cross-reference the triage docs' Variables section.

  • [protected-path] harness/triage.yaml, scripts/post-triage.sh, scripts/post-triage-test.sh — This PR modifies files under protected paths (harness/, scripts/). The PR body explains the rationale and references #1750. Human approval is always required for protected-path changes regardless of context.

Low

  • [test-inadequate] scripts/post-triage-test.sh — The new run_test_auto_code_disabled tests cover TRIAGE_AUTO_CODE=false for all three low-risk categories, but no test explicitly sets TRIAGE_AUTO_CODE=true to confirm the comparison logic. The existing tests provide implicit coverage via the default value, so this is low risk.

Labels: PR modifies triage agent configuration and post-script behavior.

@fullsend-ai-review fullsend-ai-review Bot added requires-manual-review Review requires human judgment triage-agent labels Jul 21, 2026
The review agent flagged docs/code.md as an issue because it says the
'ready-to-code' label was "unconditionally applied" and this PR changes that.

That's not really an issue b/c the triage agent already applied the label
only in certain cases, but it does highlight that the code agent docs contain
unnecessary details of triage (which will require changes when triage changes;
agents and their docs should be self-sufficient) and internal details
(post-script). This just simplifies to clean that up and only contain what
the user needs to know.

Signed-off-by: Tim deBoer <git@tdeboer.ca>
@deboer-tim

Copy link
Copy Markdown
Collaborator Author

The [stale-doc] above wasn't accurate, but it did highlight that the code agent docs had an overly detailed and unnecessary reference to triage agent. Second commit added to fix that.

@rh-hemartin rh-hemartin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but you need to resolve the last Qodo comment

@waynesun09 waynesun09 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review findings from a review sweep (severity-ordered). Two of the six findings don't have a diff-anchored line available for an inline comment, so they're included here directly; the other four are posted as inline comments on this review.

[HIGH] "Fixes fullsend-ai/fullsend#1750" is incorrect and will auto-close an unrelated issue (PR description)

Finding: fullsend-ai/fullsend#1750 ("Triage agent off by default?", still open) is a per-repo dispatch-routing bug: the triage bot's own root-cause comment says the per-repo shim workflow pins reusable-dispatch.yml@v0, a tag cut before the issues/opened -> triage routing rule existed on main, and recommends advancing the v0 tag or cutting a release. A 2026-07-02 "Meeting update" comment records the resolution as keeping the triage agent default-on and documenting that behavior clearly — it never mentions a code-agent opt-out. Separately, the underlying version-skew defect appears to already be fixed independently: fullsend-ai/fullsend#2884 ("Implement ADR 62: inline stage workflows into reusable-dispatch.yml") is closed, and the current reusable-dispatch.yml on main cites "ADR 62" and describes exactly this @v0 skew problem. This PR's diff (docs/code.md, docs/triage.md, env/triage.env, harness/triage.yaml, scripts/post-triage.sh, scripts/post-triage-test.sh) touches none of the dispatch/routing files. Merging with the "Fixes" keyword will auto-close #1750 via GitHub's cross-repo closing mechanic even though this PR neither implements nor references its actual resolution.

Suggestion: Change "Fixes" to "Relates to" (or remove the reference), and separately flag to a maintainer that #1750 looks already resolved by ADR-62/#2884 and should be closed on its own with the correct reference.


[MEDIUM] docs/triage.md's Control labels table (line 40) was not updated for the new TRIAGE_AUTO_CODE gating (docs/triage.md:40, outside this PR's diff hunk)

Finding: The ready-to-code row (docs/triage.md line 40) still reads "...is fully specified and low-risk (bug, documentation, performance)... Triggers the code agent" with no mention of the new gate, and the triaged row (line 41) still says it applies only when the issue "is a feature or other category that requires human prioritization" — no longer accurate, since bug/documentation/performance now also land on triaged whenever TRIAGE_AUTO_CODE=false. The new "### Variables" section this PR adds further down (around lines 131-139) documents the gate, but the table above it — the first, more prominent reference a reader consults — isn't updated or cross-linked, so two sections of the same doc now disagree.

Suggestion: Update both rows to note the TRIAGE_AUTO_CODE condition and link to the Variables section, e.g. "...unless TRIAGE_AUTO_CODE=false (see Variables below), in which case triaged is applied instead."

Comment thread scripts/post-triage.sh
CATEGORY=$(jq -r '.triage_summary.category // "unknown"' "${RESULT_FILE}")
echo "Category: ${CATEGORY}"
case "${CATEGORY}" in
bug)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[HIGH] Branch is stale and will conflict with the already-merged workflow-changes guard (#325) on these lines

Finding: This branch is significantly behind main (diverged, roughly 86 commits behind / 2 ahead). Current main's post-triage.sh already implements a REQUIRES_WORKFLOW/WORKFLOW_BLOCKED guard (from issue #325, "Triage should detect likely GHA workflow modifications and skip automatic code agent") that computes WORKFLOW_BLOCKED once before the case "${CATEGORY}" block and gates each of the bug/documentation/performance branches' DEFERRED_LABEL="ready-to-code" on [[ "${WORKFLOW_BLOCKED}" != "true" ]]. This PR's branch predates that change and instead adds its own per-branch if/else on TRIAGE_AUTO_CODE in the same three case arms, rewriting the same comment block above the case statement. Both branches also independently edited the same docs/code.md ready-to-code table row. Rebasing/merging will produce real textual conflicts in both files, and a naive per-hunk resolution (accepting only one side) would silently drop one of the two safety gates — neither test suite exercises the other's condition.

Suggestion: Rebase onto current main before merging. Reconcile by computing one combined boolean ahead of the case statement (e.g. AUTO_CODE_ALLOWED=true; [[ "${WORKFLOW_BLOCKED}" == "true" ]] && AUTO_CODE_ALLOWED=false; [[ "${TRIAGE_AUTO_CODE}" == "false" ]] && AUTO_CODE_ALLOWED=false), gate DEFERRED_LABEL="ready-to-code" on it in each branch, and update docs/code.md's ready-to-code row to describe both gates. Add a test combining requires_workflow_changes: true with TRIAGE_AUTO_CODE=false to confirm the merged logic resolves to triaged exactly once.

Comment thread scripts/post-triage.sh
CATEGORY=$(jq -r '.triage_summary.category // "unknown"' "${RESULT_FILE}")
echo "Category: ${CATEGORY}"
case "${CATEGORY}" in
bug)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] Identical TRIAGE_AUTO_CODE if/else block duplicated across three category branches

Finding: The same six-line block (if [[ "${TRIAGE_AUTO_CODE}" == "false" ]]; then ... add_label "triaged" ... else ... DEFERRED_LABEL="ready-to-code" ... fi) is repeated verbatim at the bug, documentation, and performance case arms (lines 323, 334, 345), differing only in the category name interpolated into the echo strings. Standing alone this is a simplification nit, but it compounds the stale-branch risk noted in the other comment on this line: main has already added a second, structurally different triplicated guard (WORKFLOW_BLOCKED, from #325) across the identical three branches, so reconciling the two features means hand-editing 3+3 near-identical branches — exactly the setup where a fix applied to one copy and missed in the other two would silently produce inconsistent outcomes between categories, uncaught by either test suite.

Suggestion: Extract a helper, e.g. apply_ready_to_code_or_triaged "${CATEGORY}", containing the shared branch logic, and call it once per case arm — ideally as part of the main-rebase reconciliation so the merged guard logic lives in one place.

Comment thread docs/triage.md

| Variable | Description | Default | Valid values |
|----------|-------------|---------|--------------|
| `TRIAGE_AUTO_CODE` | When `true`, low-risk categories (bug, documentation, performance) automatically receive the `ready-to-code` label, triggering the [code agent](code.md). When `false`, these categories receive `triaged` instead, requiring human review before coding begins. | `true` | `true`, `false` |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] TRIAGE_AUTO_CODE's design doesn't appear to have been requested or confirmed in the issue this PR claims to fix

Finding: The full fullsend-ai/fullsend#1750 thread (root-cause comment, reporter follow-up, RICE-score comment, and the 2026-07-02 meeting-update comment) doesn't discuss or request a mechanism to gate auto-promotion to ready-to-code. The meeting-update decision is scoped to whether the triage agent should run by default (yes) — a different question from whether a successful triage should auto-trigger the code agent, which is what TRIAGE_AUTO_CODE actually controls. Unlike the neighboring code comment in the same block, which cites a real discussion ("#561") for the existing feature/non-feature split, this new gate has no comparable paper trail.

Suggestion: Get explicit maintainer/reporter sign-off on the requirement (a comment on a genuinely relevant issue, or a fresh issue capturing the need) before merging, or reframe the PR description as an independent enhancement not tied to closing #1750.

Comment thread env/triage.env
@@ -1,2 +1,3 @@
export GITHUB_ISSUE_URL="${GITHUB_ISSUE_URL}"
export GH_TOKEN=${GH_TOKEN}
export TRIAGE_AUTO_CODE="${TRIAGE_AUTO_CODE:-true}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] env/triage.env ships TRIAGE_AUTO_CODE into the sandbox using a fallback syntax the harness's expansion doesn't support

Finding: env/triage.env is a host_files entry (expand: true) copied to /sandbox/workspace/.env.d/triage.env, seeding the sandboxed agent's environment. agents/triage.md (the sandboxed prompt, untouched here) never references TRIAGE_AUTO_CODE — only the runner-side scripts/post-triage.sh reads it, already served by the separate env.runner.TRIAGE_AUTO_CODE entry this PR adds in harness/triage.yaml, which is correctly absent from env.sandbox. The expand: true substitution mechanism (fullsend-ai/fullsend's internal/cli/run.go, shellSafeExpandEnv) is os.Expand(text, func(key) { return escapeForDoubleQuotes(os.Getenv(key)) }) — Go's brace expansion treats everything between ${ and } as one literal variable name, with no bash :-default support. So ${TRIAGE_AUTO_CODE:-true} is expanded by looking up an env var literally named TRIAGE_AUTO_CODE:-true (which never exists), always yielding an empty string — the file actually written into the sandbox is export TRIAGE_AUTO_CODE="", never "true", regardless of the runner's value. This contradicts docs/triage.md's claim that "The env file passes it to the sandbox automatically... no separate configuration is needed," and breaks the pattern used elsewhere in this repo (harness/code.yaml documents its analogous runner-only var CODE_ALLOWED_TARGET_BRANCHES as never entering the sandbox, correctly absent from env/code.env). Currently harmless only because nothing in the sandbox reads the variable.

Suggestion: Drop the TRIAGE_AUTO_CODE line from env/triage.env (it serves no purpose in the sandbox today) and correct docs/triage.md's claim about automatic sandbox delivery. If a sandbox-side consumer is ever needed, add it to harness/triage.yaml's env.sandbox block (matching the GITHUB_ISSUE_URL/GH_TOKEN pattern) rather than relying on bash-default syntax the harness doesn't honor.

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

Labels

requires-manual-review Review requires human judgment triage-agent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Triage agent off by default?

3 participants