Skip to content

chore(deploy): serve the event trigger on 127.0.0.1:8798 (#20) - #21

Merged
jerryfane merged 1 commit into
mainfrom
ops/trigger-addr
Nov 6, 2026
Merged

jerryfane merged 1 commit into
mainfrom
ops/trigger-addr

Conversation

@jerryfane

Copy link
Copy Markdown
Contributor

Closes #20. Assignment: gitmoot msg 402990 (the-path, AI Reviewer), #18.

  • deploy/stagehand.service: serve --trigger-addr 127.0.0.1:8798 (loopback only).
  • deploy/config.example.yaml: an events.secret_file section.

Deployment: create a 0600 /etc/stagehand/trigger.key, add events.secret_file to /etc/stagehand/config.yaml, install the unit, run daemon-reload, restart stagehand, and smoke-test with a signed curl. Roll back by removing the flag and restarting.

@jerryfane
jerryfane merged commit d49e9df into main Nov 6, 2026
2 checks passed
@jerryfane

Copy link
Copy Markdown
Contributor Author

Agent: g7-review
Runtime: omp
Job: local-review-review-router-18e557f29b78abc1-1

Decision: approved
Summary: Reviewed the complete two-file diff from base d5b9056 to exact head 142b17f. No P0–P2 findings. The serve flag and events configuration keys match production code; the default payload limit is 67108864 bytes. Verified non-loopback addresses are rejected without --trigger-allow-remote and missing events.secret_file produces a clear startup failure. The unit has no other changes beyond the trigger flag and explanatory comment. Local static build, vet, tests, and isolated end-to-end smoke passed. Local CGO vet and race tests were blocked by sandbox denial of a compiler header; both passed in independently verified exact-head CI. No prior PR findings exist in the frozen verdict file or GitHub review records. No repository files were modified.

Tests Run

  • CGO_ENABLED=0 go build -trimpath -o "$TMPDIR/stagehand-review-pr21-142b17f" ./cmd/stagehand && "$TMPDIR/stagehand-review-pr21-142b17f" version -> passed; output: stagehand dev.
  • CGO_ENABLED=0 go vet ./... -> passed.
  • CGO_ENABLED=0 go test -count=1 ./... -> passed, including internal/cli, internal/engine, and internal/trigger.
  • go vet ./... -> blocked: runtime/cgo compilation denied access to /usr/include/stdc-predef.h.
  • go test -race -count=1 ./... -> blocked: runtime/cgo compilation denied access to /usr/include/stdc-predef.h.
  • CI-verified: go vet ./... -> success; run 42158422991 job 127698009432
  • CI-verified: go test -race -count=1 ./... -> success; run 42158422991 job 127698009432
  • Production-binary subprocess checks: stagehand serve --trigger-addr 127.0.0.1:8798 -> missing secret exited 1 with an explicit events.secret_file requirement; relative secret paths, negative payload limits, unknown configuration keys, and permissive secret-file permissions were rejected.
  • Production-binary subprocess checks: stagehand serve --trigger-addr 0.0.0.0:8798; stagehand serve --trigger-addr :8798; stagehand serve --trigger-addr 192.0.2.1:8798 -> each exited 1 and required --trigger-allow-remote.
  • stagehand --config deploy/config.example.yaml status -> strict YAML decoding and validation passed; startup then stopped at the expected unprovisioned agent.sandboxd.api_key_file.
  • Isolated production smoke: stagehand serve --status-addr 127.0.0.1:40415 --trigger-addr 127.0.0.1:44241 -> status HTTP 200, unsigned trigger HTTP 401, signed event HTTP 202, duplicate HTTP 200, and stagehand runs smoke --json confirmed exactly one successful shell run. Listener reported the exact loopback address; SIGTERM exited 0.
  • Isolated HTTP payload-boundary smoke -> authenticated 67108864-byte request reached pipeline lookup; 67108865-byte request returned HTTP 413 with the correct limit.

Raw runtime output was retained in local Gitmoot state and is not posted here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deploy: enable the event trigger endpoint on the fleet host

1 participant