• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

facebookincubator / TTPForge / 36640056508
53%
main: 67%

Build:
Build:
LAST BUILD BRANCH: export-D120420789
DEFAULT BRANCH: main
Ran 29 Sep 2026 10:32PM UTC
Jobs 1
Files 88
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Sep 2026 10:30PM UTC coverage: 53.148%. First build
36640056508

Pull #643

github

facebook-github-bot
Forward named environment variables to remote steps (#643)

Summary:

## Context
- Remote commands do not inherit the runner's environment. Callers need to forward selected values, such as run identifiers, across SSH without editing each TTP.
- Forwarding is requested through a CLI flag so an older binary rejects unsupported usage before executing the TTP.
- GitHub CI exposed an existing Go version mismatch: `new("baz")` in `pkg/args/choices_test.go` requires Go 1.26, while the module selected Go 1.25.5.
## This Diff
- Add repeatable `--forward-env NAME` for remote `inline:` and `file:` commands.
- Trim and deduplicate names in argument order. Require nonempty names to match `[A-Za-z_][A-Za-z0-9_]*`; reject invalid names before remote command dispatch, even if unset. Skip unset variables; retain set-but-empty values on supported remote shells.
- Pass forwarded values literally, including `$forge.` references. Continue expanding TTP-level and step-level `env`, with forwarded < TTP < step precedence.
- Document the CLI interface, version requirement, validation, and precedence in the remote execution guide and schema reference.
- Cover forwarding and precedence with 14 authenticated loopback SSH cases, 12 invalid-name helper cases, and 6 executor rejection cases across POSIX, PowerShell, and cmd configurations.
- Set the module minimum to Go 1.26.0 and select Go 1.26.5. Have GitHub pre-commit derive its Go version from `go.mod`.
- Validate forwarded, TTP-level, and step-level environment names on every SSH shell backend before opening a command session.
- Quote `cmd.exe` environment assignments so operators and trailing spaces remain literal. Reject values that cmd cannot safely preserve (empty strings, double quotes, `%`, `!`, and ASCII controls); errors omit values.

Reviewed By: d0n601

Differential Revision: D120420789
Pull Request #643: Forward named environment variables to remote steps (#643)

58 of 70 new or added lines in 4 files covered. (82.86%)

3318 of 6243 relevant lines covered (53.15%)

15.67 hits per line

Uncovered Changes

Lines Coverage ∆ File
11
12.53
pkg/backends/ssh.go
1
61.25
pkg/blocks/executor.go
Jobs
ID Job ID Ran Files Coverage
1 36640056508.1 29 Sep 2026 10:32PM UTC 88
53.15
GitHub Action Run
Source Files on build 36640056508
  • Tree
  • List 88
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #643
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc