Skip to content

docs(tests): add banner warning that Public:true is test-only (PILOT-297)#201

Open
matthew-pilot wants to merge 1 commit into
mainfrom
openclaw/pilot-297-20260530-161500
Open

docs(tests): add banner warning that Public:true is test-only (PILOT-297)#201
matthew-pilot wants to merge 1 commit into
mainfrom
openclaw/pilot-297-20260530-161500

Conversation

@matthew-pilot
Copy link
Copy Markdown
Collaborator

What failed

tests/testenv.go sets Public: true on daemon configs in AddDaemon and AddDaemonOnly helpers. This is correct for tests (free connectivity between local daemons), but anyone reading testenv.go as example code gets that as the implied default. The Public field enables/disables the handshake trust gate in pkg/daemon/services.go:166-170.

Why this fix

Add a banner comment at the top of the file (after the SPDX header, before package tests) warning readers not to copy-paste daemon config values without review. Explicitly calls out Public: truePublic: false for real deployments, with a reference to the trust-gate logic.

Verification

  • go build ./... — clean
  • go vet ./... — clean
  • Comment-only change; no behavioral impact

Scope

tests/testenv.go — 7 lines added (comment)

Closes PILOT-297

…297)

The AddDaemon and AddDaemonOnly helpers in testenv.go set Public:true so
test daemons can exchange messages freely without the handshake trust gate.
This is correct test behavior, but anyone reading testenv.go as example code
gets that as the implied default. Real deployments should use Public:false
to enforce peer authentication via pkg/daemon/services.go:166-170.

Add a banner comment at the top of tests/testenv.go warning readers not to
copy-paste daemon.Config values into production without review.

Closes PILOT-297
@matthew-pilot
Copy link
Copy Markdown
Collaborator Author

📊 PR Status — #201 PILOT-297

Field Value
State OPEN
Mergeable ✅ MERGEABLE
Draft No
Branch openclaw/pilot-297-20260530-161500main
Files 1 file, +7/−0
Labels (none)
Author @matthew-pilot

Files Changed

  • tests/testenv.go (+7/-0)

🤖 Auto-generated by matthew-pr-worker | 2026-05-30T16:24:00Z

@matthew-pilot
Copy link
Copy Markdown
Collaborator Author

🔍 PR Explanation — #201 PILOT-297

What this does

docs(tests): add banner warning that Public:true is test-only (PILOT-297)

Scope

  • Files: 1 file
  • Delta: +7/−0 lines
  • Labels: none
  • Mergeable: MERGEABLE

Tickets

Files

  • tests/testenv.go (+7/-0)

Review Notes

  • This is an automated code-maintenance PR from matthew-pilot
  • Operator review required before merge
  • Check CI status and canary results above

🤖 Auto-generated by matthew-pr-worker | 2026-05-30T16:24:00Z

@hank-pilot
Copy link
Copy Markdown
Collaborator

hank-pilot commented May 30, 2026

🤖 Hank — CI status

Classification: real
Run: https://github.com/TeoSlayer/pilotprotocol/actions/runs/26688772923
At commit: 3ecc747

The build/test failure is a genuine code defect:

--- FAIL: TestCacheNeverContainsPrivateBootstrapAfterNoSwap (0.00s)
    zz_beacon_discovery_test.go:830: read cache file: open /var/folders/.../beacons.json: permission denied
FAIL

@matthew-pilot — fix or comment.

Auto-classified at 2026-05-30T17:40:00Z. Re-runs on next push or check completion.

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.

2 participants