Skip to content

Kill switch base-config follow-ups from #8141 (invalid override values, GitLab env size, test coverage) #8455

Open

Description

@waynesun09

Context

Follow-up to #8141 (fixes #8111), which makes the GitHub and GitLab route kill-switch checks consult config.base.yaml. These review items were left open when it was approved, and are tracked here so the PR could merge.

Fail-open items

  1. An invalid config.yaml value hides a base kill_switch: true (both forges). Any non-null overlay value is taken as final, even when it isn't a recognised true/false spelling. With config.base.yaml kill_switch: true, a config.yaml of kill_switch: "", [], {}, garbage, or a file that is one bare scalar still dispatches built-in stages. Go's LoadConfig rejects all of these (cannot unmarshal !!str garbage into bool), so harness-dispatch fails closed while the route step fails open. Fix: after quote stripping, halt on true/yes, proceed on false/no/null, and fail on anything else. On GitLab, treat a non-bool result as active. Add tests for these values against a base true.
  2. GitLab fails open on configs over 128 KiB (new in fix(#8111): consult config.base.yaml for kill_switch in GitHub and GitLab dispatch #8141). run-agent-job.sh now passes both config texts as environment variables instead of stdin. Linux caps one env string at 128 KiB, so a ~140 KB config.yaml gives python3: Argument list too long, then the "treating as unconfigured" warning, and dispatch proceeds. Fix: write both texts to temp files under RUNNER_TEMP and pass the paths.
  3. A two-document config.yaml hides the base switch. yq evaluates every document (foo: 1 / --- / kill_switch: true prints null then true), so the override wins. Go reads only the first document. Fix: select(document_index == 0), or fail on multi-line output.

Correctness of comments and tests

  1. The workflow comment in reusable-dispatch.yml says quote stripping matches go-yaml's handling of a quoted "true". yaml.v3 rejects kill_switch: "true" with a decode error; only a quoted "yes" decodes as true. Halting on quoted "true" is still right (pre-fix(#8111): consult config.base.yaml for kill_switch in GitHub and GitLab dispatch #8141 yq parity, and fail-closed), but the stated reason should be corrected.
  2. Nothing guards the route job's sparse-checkout of .fullsend/config.base.yaml. TestCheckKillSwitchStep_ConsultsConfigBaseYAML writes the file straight into a temp dir, so dropping the sparse-checkout line would pass every test. The new e2e scenario uses a custom harness, which runs in harness-dispatch (no needs: route) and already reads the base file through Go, so it never reaches the changed step. Add a built-in-stage scenario with the switch set only in config.base.yaml, or at least a Go test asserting the sparse-checkout list.

Test polish (low)

  1. pkg/behaviourtest/steps/cleanup.go (ValidateSlotClean) treats any error reading the base file as "absent". Use forge.IsNotFound.
  2. Halt cases in internal/scaffold/github_kill_switch_test.go assert only a non-zero exit, so a yq error or a bad substitution on bash 3.2 passes them. Also assert the Kill switch is active message.
  3. KillSwitchBaseActivated in pkg/behaviourtest/world/world.go is not reset in resetScenarioWorld.

Out of scope here

GitLab still proceeds with a warning when config.yaml is malformed and the base sets the switch; #8111 put that pre-existing behaviour out of scope.

Items 1, 3, 4 and 5 touch .github/workflows/reusable-dispatch.yml, which needs a human change (the code agent has no workflows permission).

Activity

  1. fullsend-ai-triage commented on Oct 15, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 11:44 AM UTC · Completed 11:46 AM UTC

    Commit: 3b5e19f · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.16

  2. added
    blocked
    on Oct 15, 2026
  3. fullsend-ai-triage commented on Oct 15, 2026

    @fullsend-ai-triage

    Thanks for tracking these follow-ups in one place. Work on them is blocked until PR #8141 merges. It is still open (approved and mergeable, but not yet merged), and the code and tests these items change are introduced by that PR. For example, internal/scaffold/github_kill_switch_test.go and the base-config handling in the route kill-switch step do not exist on the default branch yet. Items 1, 2, 3, 5, 7 and 8 modify that new code directly. #8141 doesn't address any of the eight items, so this issue isn't being fixed in flight.

    Once #8141 merges, this issue can be re-triaged. The description is already detailed enough to implement.

    Note for whoever picks this up: items 1, 3, 4 and 5 involve .github/workflows/reusable-dispatch.yml. The code agent has no workflows permission, so those changes will need a human PR or maintainer action. Items 2, 6, 7 and 8 are outside the workflow files and could be done by the code agent.

    Blocked by:

  4. rh-hemartin commented on Oct 30, 2026

    @rh-hemartin
    Member

    /fs-triage [Automated Message] the blocking PR is already merged

  5. fullsend-ai-triage commented on Oct 30, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 11:49 AM UTC · Completed 11:51 AM UTC

    Commit: 8b8c75b · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.15

  6. added
    triaged
    and removed
    blocked
    on Oct 30, 2026
  7. fullsend-ai-triage commented on Oct 30, 2026

    @fullsend-ai-triage

    The blocker (PR #8141) has merged. The eight items were re-checked against the default branch and all still apply. No open PR addresses them, and no duplicate issue was found.

    Workflow-file warning: items 1, 3, 4 and 5 involve .github/workflows/reusable-dispatch.yml. The code agent cannot modify workflow files under its current permissions, so this issue is flagged requires_workflow_changes and will not be auto-dispatched to the code agent. Those changes need a human PR or maintainer action. Items 2 (GitLab temp files), 6, 7 and 8, and the Go-side parts of item 5 (a sparse-checkout assertion test), don't touch workflow files. A maintainer may want to split the issue so those can be automated.

    Notes for the implementer:

    • Items 1 and 3 should match Go's LoadConfig behaviour: first document only, and fail closed on anything that is not a recognised bool.
    • Two details from the report were not independently re-verified: yaml.v3's handling of a quoted "true" (item 4), and the exact current assertions in the halt-case tests (item 7). Both are quick to confirm.

    Suggested test case:

    base kill_switch: true, overlay in {"", [], {}, garbage, bare scalar, 2-doc with true in doc 2}
      -> route step / GitLab script halts or fails; never dispatches; halt path prints "Kill switch is active"
    overlay false/no -> proceeds (overlay wins); overlay null/absent -> base value applies
    GitLab with config.yaml > 128 KiB -> no "Argument list too long"; decision is correct
    Go test: route job sparse-checkout list includes .fullsend/config.base.yaml
    

    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtriaged

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions