The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
Fix Beacon release validation blockers
shukieshah0b57dce167e4
diff --git a/beacon-installation-notes.md b/beacon-installation-notes.mdnew file mode 100644index 00000000..0f6a6285--- /dev/null+++ b/beacon-installation-notes.md@@ -0,0 +1,47 @@+## Finding: User-mode collector service does not stay running++- Area: endpoint+- Severity: blocker+- Environment: macOS 15.5 arm64, Beacon 0.0.12, Homebrew install from `asymptote-labs/tap`+- Expected: After `beacon endpoint install`, `beacon endpoint status` should report the collector service running and OTLP ports listening on `127.0.0.1:4317` and `127.0.0.1:4318`.+- Actual: `beacon endpoint install` exits successfully and writes config/log files, but repeated status checks report `Collector: grpc=false http=false (Collector ports are not listening)` and JSON status reports `service.loaded=true` with `service.running=false`.+- Reproduction: `brew tap asymptote-labs/tap && brew install beacon && beacon endpoint install && beacon endpoint status && sleep 5 && beacon endpoint status --json`+- Evidence: `/Users/shukan/beacon-e2e-20260518-184846/endpoint-status-recheck.txt`, `/Users/shukan/beacon-e2e-20260518-184846/status-after-install-recheck.json`, and `/tmp/com.beacon.endpoint.collector.user.err`+- Suspected cause: Beacon CLI 0.0.12 writes `include_runtime_metrics: false` into the `beaconjson` exporter config by default, but the bundled Homebrew `beacon-otelcol` rejects that key during config decode. This indicates a CLI/collector release artifact mismatch or an insufficient release smoke gate.+- Proposed fix: Omit the `include_runtime_metrics` exporter key unless the user explicitly opts in, and add release validation that runs the generated endpoint collector config through the bundled collector before publishing.++## Finding: Homebrew arm64 release embeds amd64 hook adapter++- Area: packaging+- Severity: blocker+- Environment: macOS 15.5 arm64, Beacon 0.0.12, Homebrew install from `asymptote-labs/tap`, Cursor 3.4.20+- Expected: `beacon endpoint hooks install --harness cursor` should install a usable `beacon-hooks` adapter under `~/.beacon/endpoint/hooks/` on Apple Silicon.+- Actual: Hook installation fails with `embedded hooks binary is not usable on this host: architecture mismatch: embedded hooks binary is darwin/amd64 but this CLI is darwin/arm64`.+- Reproduction: `beacon endpoint install && beacon endpoint hooks install --harness cursor`+- Evidence: `/Users/shukan/beacon-e2e-20260518-184846/cursor-hooks.txt`+- Suspected cause: GoReleaser target builds write platform-specific hook binaries to the same `cli/beacon/internal/embedded/hooks.bin` path. Parallel target builds can race, allowing the darwin/arm64 CLI archive to embed a darwin/amd64 hook adapter.+- Proposed fix: Serialize GoReleaser builds that mutate the shared embedded hook path, keep the embedded architecture test failing hard for real mismatches, and validate hook installation from each release candidate archive before publishing.++## Finding: Elastic docs query uses pre-ingest field names++- Area: elastic+- Severity: minor+- Environment: macOS 15.5 arm64, Beacon 0.0.12 with local fixes, local Elastic stack from `beacon endpoint elastic up`+- Expected: The documented validation query `logs-beacon.endpoint-*/_search?q=product:endpoint-agent` should find ingested Beacon events.+- Actual: The query returns zero hits because the ingest pipeline stores Beacon release-contract fields under `beacon.*`; `product` becomes `beacon.product`, `harness.name` becomes `beacon.harness.name`, and prompt text becomes `beacon.prompt.text`.+- Reproduction: `curl "http://localhost:9200/logs-beacon.endpoint-*/_search?q=product:endpoint-agent"` after local Filebeat ingestion starts.+- Evidence: `/Users/shukan/beacon-e2e-20260518-184846/elastic-search-product-retry.json`, `/Users/shukan/beacon-e2e-20260518-184846/elastic-one-marker-full.json`, and `/Users/shukan/beacon-e2e-20260518-184846/elastic-field-caps.json`+- Suspected cause: The docs and runbook validate against raw JSONL field names, while the Elastic ingest pipeline intentionally maps Beacon fields into `beacon.*` ECS-adjacent fields.+- Proposed fix: Update Elastic validation docs and runbook examples to query `beacon.product:endpoint-agent`, `beacon.harness.name:<runtime>`, and `beacon.prompt.text:"Beacon E2E"`.++## Finding: Kibana data view name differs from docs++- Area: elastic+- Severity: polish+- Environment: macOS 15.5 arm64, Beacon 0.0.12 with local fixes, local Elastic stack from `beacon endpoint elastic up`+- Expected: Docs say to select the `Beacon Endpoint Events` data view in Kibana Discover.+- Actual: The saved object installed by the local pack is named `Beacon Endpoint` with title `logs-beacon.endpoint-*`.+- Reproduction: Start the local Elastic stack and query Kibana saved objects with `curl -H 'kbn-xsrf: beacon-e2e' 'http://localhost:5601/api/saved_objects/_find?type=index-pattern&search=Beacon%20Endpoint%20Events&per_page=10'`.+- Evidence: `/Users/shukan/beacon-e2e-20260518-184846/kibana-data-view-search.json`+- Suspected cause: Docs and Kibana saved object naming drifted.+- Proposed fix: Either rename the data view saved object to `Beacon Endpoint Events` or update docs to tell users to select `Beacon Endpoint`.diff --git a/beacon-release-validation-runbook.md b/beacon-release-validation-runbook.mdnew file mode 100644index 00000000..5bf85d56--- /dev/null+++ b/beacon-release-validation-runbook.md@@ -0,0 +1,398 @@+# Beacon CLI End-To-End Release Validation Runbook++## Goal+Validate a stable public Beacon release from the user-facing docs at [https://docs.asymptotelabs.ai/cli](https://docs.asymptotelabs.ai/cli), not a local build, and capture any install, docs, integration, or product bugs in `beacon-installation-notes.md` before changing code.++Use repo context only after runtime testing to decide whether each finding is docs-only, CLI behavior, hook behavior, collector/exporter behavior, packaging, or Elastic content-pack behavior.++## Test Environment+Run on macOS with:++- Homebrew available and online.+- Docker Desktop or Docker Compose available for local Elastic validation.+- A dedicated test macOS user or a workstation where changing local AI runtime config is acceptable.+- Authenticated/installable runtimes for the full matrix: Cursor, Claude Code, Codex CLI, and OpenCode.+- Repo checkout available at `/Users/shukan/Workspace/agent-beacon` for writing notes and later researching fixes.+- Integration validation is user-assisted for now. The agent prepares Beacon, asks the user to submit unique prompts in each runtime, then self-verifies the resulting events in `runtime.jsonl` and Elastic. Headless/noninteractive runtime commands can be used as an optional fast path only when local auth and CLI behavior are known to be reliable.++Before running commands, record environment evidence:++```bash+sw_vers+uname -m+brew --version+docker --version || true+docker compose version || true+which beacon || true+beacon version || true+which agent || true+agent --version || true+which claude || true+claude --version || true+which codex || true+codex --version || true+which opencode || true+opencode --version || true+```++## Safety And State Baseline+Create a timestamped test directory and preserve all user-owned config files Beacon may touch:++```bash+export BEACON_E2E_RUN="${HOME}/beacon-e2e-$(date +%Y%m%d-%H%M%S)"+mkdir -p "$BEACON_E2E_RUN/backups"++for path in \+ "$HOME/.beacon" \+ "$HOME/.claude/settings.json" \+ "$HOME/.codex/config.toml" \+ "$HOME/.cursor/hooks.json" \+ "$HOME/.config/opencode/plugins/beacon.ts"; do+ if [ -e "$path" ]; then+ mkdir -p "$BEACON_E2E_RUN/backups/$(dirname "${path#$HOME/}")"+ cp -R "$path" "$BEACON_E2E_RUN/backups/${path#$HOME/}"+ fi+done+```++Do not restore backups, stop Beacon, stop Elastic, or uninstall anything automatically. The default outcome of this runbook is to preserve the tested Beacon state so the user can continue inspecting runtime logs, hook config, the local dashboard, and Kibana after validation.++## Documentation Walkthrough+Read the docs exactly like a new user, starting from:++- [https://docs.asymptotelabs.ai/cli](https://docs.asymptotelabs.ai/cli)+- [https://docs.asymptotelabs.ai/cli/quickstart-developers](https://docs.asymptotelabs.ai/cli/quickstart-developers)+- [https://docs.asymptotelabs.ai/cli/installation](https://docs.asymptotelabs.ai/cli/installation)+- [https://docs.asymptotelabs.ai/cli/endpoint](https://docs.asymptotelabs.ai/cli/endpoint)+- [https://docs.asymptotelabs.ai/cli/hooks](https://docs.asymptotelabs.ai/cli/hooks)+- [https://docs.asymptotelabs.ai/cli/supported-runtimes](https://docs.asymptotelabs.ai/cli/supported-runtimes)+- [https://docs.asymptotelabs.ai/cli/elastic](https://docs.asymptotelabs.ai/cli/elastic)+- [https://docs.asymptotelabs.ai/cli/siem-forwarding-elastic](https://docs.asymptotelabs.ai/cli/siem-forwarding-elastic)++For every confusing step, mismatch, missing prerequisite, wrong command, broken link, or unclear success criterion, append a finding to `beacon-installation-notes.md` with:++```markdown+## Finding: <short title>++- Area: docs | install | endpoint | cursor | claude | codex | opencode | elastic | packaging+- Severity: blocker | major | minor | polish+- Environment: <OS, arch, Beacon version, runtime version>+- Expected: <what a new user would expect from docs>+- Actual: <what happened>+- Reproduction: <commands or UI steps>+- Evidence: <key command output, log line, event excerpt, screenshot path if applicable>+- Suspected cause: <leave blank until repo research if unknown>+- Proposed fix: <leave blank until repo research if unknown>+```++## Homebrew Install Validation+Validate the shipped Homebrew formula and installed artifacts:++```bash+brew tap asymptote-labs/tap+brew install beacon+brew info beacon+which beacon+beacon version+beacon --help+beacon endpoint --help+```++Acceptance criteria:++- `beacon version` prints a released version, not a local dev build.+- `which beacon` resolves to the Homebrew-installed binary.+- Help output includes `endpoint`, `endpoint hooks`, and `endpoint elastic` command groups.++## Endpoint Quickstart Validation+Follow the quickstart exactly:++```bash+beacon endpoint install+beacon endpoint status+beacon endpoint status --json > "$BEACON_E2E_RUN/status-after-install.json"+beacon endpoint discover+beacon endpoint discover --json > "$BEACON_E2E_RUN/discover-after-install.json"+```++Validate local state:++```bash+test -f "$HOME/.beacon/endpoint/config.json"+test -f "$HOME/.beacon/endpoint/otelcol.yaml"+test -f "$HOME/.beacon/endpoint/logs/runtime.jsonl"+python3 -m json.tool < "$HOME/.beacon/endpoint/config.json" > "$BEACON_E2E_RUN/config.pretty.json"+```++Acceptance criteria:++- Install exits successfully without sudo in user mode.+- Status reports collector/config/log paths clearly.+- `~/.beacon/endpoint/logs/runtime.jsonl` exists.+- The runtime log contains a Beacon endpoint event such as `telemetry.enabled` or another install/status event.+- Claude and Codex configuration files are created or updated consistently with the docs.++Repo areas to research later if failures occur:++- [`cli/beacon/cmd/endpoint.go`](cli/beacon/cmd/endpoint.go)+- [`cli/beacon/internal/endpoint/lifecycle/lifecycle.go`](cli/beacon/internal/endpoint/lifecycle/lifecycle.go)+- [`cli/beacon/internal/endpoint/harness/harness.go`](cli/beacon/internal/endpoint/harness/harness.go)+- [`cli/beacon/internal/endpoint/writer/writer.go`](cli/beacon/internal/endpoint/writer/writer.go)++## Cursor Integration Test+Install Cursor hooks, then ask the user to submit a unique prompt in Cursor:++```bash+beacon endpoint hooks install --harness cursor+beacon endpoint hooks status --harness cursor+beacon endpoint hooks status --harness cursor --json > "$BEACON_E2E_RUN/cursor-hooks-status.json"+```++User runtime action:++```bash+export BEACON_E2E_CURSOR_MARKER="Beacon E2E Cursor prompt $(date +%s)"+printf 'Please submit this prompt in Cursor: %s\n' "$BEACON_E2E_CURSOR_MARKER"+```++Optional headless fast path, only when Cursor CLI auth is known to work:++```bash+agent -p --output-format text "$BEACON_E2E_CURSOR_MARKER: answer with exactly the word beacon-ok." \+ > "$BEACON_E2E_RUN/cursor-headless.out" \+ 2> "$BEACON_E2E_RUN/cursor-headless.err"+```++Validation:++```bash+rg "$BEACON_E2E_CURSOR_MARKER|cursor|prompt|beacon-ok" "$HOME/.beacon/endpoint/logs/runtime.jsonl" \+ > "$BEACON_E2E_RUN/cursor-runtime-events.txt"+```++Acceptance criteria:++- Hook status reports Cursor installed.+- The user confirms the prompt was submitted, or the optional headless command exits successfully.+- Runtime log contains a Cursor prompt event with the marker when content retention is `full`.+- Event has stable Beacon fields including `vendor`, `product`, `schema_version`, `event`, timestamp, and a Cursor/session context where available.+- Cursor remains usable if hook telemetry fails; if the prompt succeeds but no event appears, record this as an integration or hook-coverage finding.++Repo areas to research later:++- [`cli/beacon/internal/endpoint/hooks/cursor.go`](cli/beacon/internal/endpoint/hooks/cursor.go)+- [`cli/beacon-hooks/cmd/prompt_submit.go`](cli/beacon-hooks/cmd/prompt_submit.go)+- [`cli/beacon-hooks/internal/logging/logging.go`](cli/beacon-hooks/internal/logging/logging.go)++## Claude Code Integration Test+Confirm Beacon configured Claude settings, then ask the user to submit a unique prompt in Claude Code:++```bash+python3 -m json.tool < "$HOME/.claude/settings.json" > "$BEACON_E2E_RUN/claude-settings.pretty.json" || true+beacon endpoint status --json > "$BEACON_E2E_RUN/status-before-claude.json"+```++Runtime action:++```bash+export BEACON_E2E_CLAUDE_MARKER="Beacon E2E Claude prompt $(date +%s)"+printf 'Please submit this prompt in Claude Code: %s\n' "$BEACON_E2E_CLAUDE_MARKER"+```++Optional headless fast path, only when Claude Code headless mode is known to work:++```bash+claude -p "$BEACON_E2E_CLAUDE_MARKER: answer with exactly the word beacon-ok." \+ --output-format json \+ > "$BEACON_E2E_RUN/claude-headless.json" \+ 2> "$BEACON_E2E_RUN/claude-headless.err"+```++Validation:++```bash+rg "$BEACON_E2E_CLAUDE_MARKER|claude|beacon-ok" "$HOME/.beacon/endpoint/logs/runtime.jsonl" \+ > "$BEACON_E2E_RUN/claude-runtime-events.txt"+```++Acceptance criteria:++- The user confirms the prompt was submitted, or the optional headless command exits successfully.+- Runtime log receives Claude OTLP-derived events.+- Prompt content appears only when retention mode permits it.+- If no events appear, status output makes collector/log path issues diagnosable.++Repo areas to research later:++- [`cli/beacon/internal/endpoint/harness/harness.go`](cli/beacon/internal/endpoint/harness/harness.go)+- [`collector-builder/exporter/beaconjsonexporter/exporter.go`](collector-builder/exporter/beaconjsonexporter/exporter.go)+- [`collector-builder/exporter/beaconjsonexporter/event.go`](collector-builder/exporter/beaconjsonexporter/event.go)++## Codex Integration Test+Confirm Beacon configured Codex, then ask the user to submit a unique prompt in Codex:++```bash+cp "$HOME/.codex/config.toml" "$BEACON_E2E_RUN/codex-config.toml" || true+beacon endpoint status --json > "$BEACON_E2E_RUN/status-before-codex.json"+```++Runtime action:++```bash+export BEACON_E2E_CODEX_MARKER="Beacon E2E Codex prompt $(date +%s)"+printf 'Please submit this prompt in Codex: %s\n' "$BEACON_E2E_CODEX_MARKER"+```++Optional headless fast path, only when Codex noninteractive mode is known to work:++```bash+codex exec --json "$BEACON_E2E_CODEX_MARKER: answer with exactly the word beacon-ok." \+ > "$BEACON_E2E_RUN/codex-headless.jsonl" \+ 2> "$BEACON_E2E_RUN/codex-headless.err"+```++Validation:++```bash+rg "codex|$BEACON_E2E_CODEX_MARKER|beacon-ok" "$HOME/.beacon/endpoint/logs/runtime.jsonl" \+ > "$BEACON_E2E_RUN/codex-runtime-events.txt"+```++Acceptance criteria:++- The user confirms the prompt was submitted, or the optional noninteractive command exits successfully.+- Runtime log receives Codex OTLP-derived events.+- Prompt text behavior matches docs: Beacon config disables Codex prompt logging by default, so absence of raw prompt text may be expected, but agent activity events should still appear.+- Noisy internal transport spans should not dominate the log.++Repo areas to research later:++- [`cli/beacon/internal/endpoint/harness/harness.go`](cli/beacon/internal/endpoint/harness/harness.go)+- [`collector-builder/exporter/beaconjsonexporter/exporter_test.go`](collector-builder/exporter/beaconjsonexporter/exporter_test.go)++## OpenCode Integration Test+Install OpenCode hooks, then ask the user to submit a unique prompt in OpenCode:++```bash+beacon endpoint hooks install --harness opencode+beacon endpoint hooks status --harness opencode+beacon endpoint hooks status --harness opencode --json > "$BEACON_E2E_RUN/opencode-hooks-status.json"+```++Runtime action:++```bash+export BEACON_E2E_OPENCODE_MARKER="Beacon E2E OpenCode prompt $(date +%s)"+printf 'Please submit this prompt in OpenCode: %s\n' "$BEACON_E2E_OPENCODE_MARKER"+```++Optional headless fast path, only when OpenCode noninteractive mode is known to work:++```bash+opencode run --format json "$BEACON_E2E_OPENCODE_MARKER: answer with exactly the word beacon-ok." \+ > "$BEACON_E2E_RUN/opencode-headless.json" \+ 2> "$BEACON_E2E_RUN/opencode-headless.err"+```++If the installed OpenCode CLI uses a different noninteractive command or flag set, document the discrepancy and use the current recommended command from `opencode --help`.++Validation:++```bash+rg "OpenCode|opencode|$BEACON_E2E_OPENCODE_MARKER|beacon-ok" "$HOME/.beacon/endpoint/logs/runtime.jsonl" \+ > "$BEACON_E2E_RUN/opencode-runtime-events.txt"+```++Acceptance criteria:++- Hook status reports OpenCode plugin installed.+- The user confirms the prompt was submitted, or the optional noninteractive command exits successfully.+- Runtime log contains OpenCode chat/session activity with the marker when content retention is `full`.+- OpenCode remains usable if Beacon hook execution fails; if the prompt succeeds but no event appears, record this as an integration or hook-coverage finding.++Repo areas to research later:++- [`cli/beacon/internal/endpoint/hooks/opencode.go`](cli/beacon/internal/endpoint/hooks/opencode.go)+- [`cli/beacon/internal/endpoint/hooks/assets/opencode/embed.go`](cli/beacon/internal/endpoint/hooks/assets/opencode/embed.go)+- [`cli/beacon-hooks/cmd/opencode_event.go`](cli/beacon-hooks/cmd/opencode_event.go)++## Local Elastic Integration Test+Generate and run the local Elastic content pack from the Homebrew CLI:++```bash+beacon endpoint elastic install-pack --output "$BEACON_E2E_RUN/beacon-elastic-pack"+beacon endpoint elastic up --pack-dir "$BEACON_E2E_RUN/beacon-elastic-pack"+```++Wait for services, then validate Elasticsearch directly before using Kibana:++```bash+curl -fsS http://localhost:9200 >/dev/null+curl -fsS "http://localhost:9200/logs-beacon.endpoint-*/_search?q=beacon.product:endpoint-agent&size=5" > "$BEACON_E2E_RUN/elastic-search-product.json"+curl -fsS "http://localhost:9200/logs-beacon.endpoint-*/_search?q=beacon.prompt.text:%22Beacon%20E2E%22&size=20" > "$BEACON_E2E_RUN/elastic-search-marker.json"+curl -fsS "http://localhost:9200/logs-beacon.endpoint-*/_search?q=beacon.harness.name:cursor&size=5" > "$BEACON_E2E_RUN/elastic-search-cursor.json"+```++Kibana validation:++- Open [http://localhost:5601](http://localhost:5601).+- Go to Discover.+- Select `Beacon Endpoint Events`.+- Search for `beacon.prompt.text:"Beacon E2E"` and for each runtime field value: `beacon.harness.name:cursor`, `beacon.harness.name:claude_code`, `beacon.harness.name:codex_cli`, `beacon.harness.name:opencode`.+- Save screenshots or notes if the data view is missing, fields are poorly named, timestamps are wrong, or events are hard to find.++Acceptance criteria:++- `elastic up` creates or uses the content pack successfully.+- Elasticsearch, Kibana, and Filebeat start on loopback ports.+- Events from all successful runtime tests are searchable in Elasticsearch.+- Kibana has a usable Beacon data view and Discover workflow.+- Generated pack points Filebeat at the same runtime log Beacon writes.++Repo areas to research later:++- [`cli/beacon/internal/endpoint/elastic/elastic.go`](cli/beacon/internal/endpoint/elastic/elastic.go)+- [`cli/beacon/internal/endpoint/elastic/pack/README.md`](cli/beacon/internal/endpoint/elastic/pack/README.md)+- [`cli/beacon/internal/endpoint/elastic/pack/docker-compose.yml`](cli/beacon/internal/endpoint/elastic/pack/docker-compose.yml)++## Notes Review And Fix Planning+After all tests, review `beacon-installation-notes.md` and group findings:++- Docs fixes: docs command, prerequisite, expected-output, broken-link, or troubleshooting updates.+- CLI fixes: command flags, status clarity, install/repair behavior, error messages, or path mismatch.+- Hook fixes: Cursor/OpenCode install/status, hook payload parsing, runtime resilience, or content retention.+- Exporter fixes: Claude/Codex OTLP normalization, filtering, field mapping, or event schema consistency.+- Elastic fixes: generated pack, Docker Compose stack, Filebeat config, index templates, ingest pipeline, Kibana assets, or docs.++For each confirmed bug, research the smallest relevant code path and add or update focused tests before implementation. Use existing validation patterns from:++- [`cli/beacon/internal/endpoint/lifecycle/lifecycle_test.go`](cli/beacon/internal/endpoint/lifecycle/lifecycle_test.go)+- [`cli/beacon/internal/endpoint/harness/harness_test.go`](cli/beacon/internal/endpoint/harness/harness_test.go)+- [`cli/beacon/internal/endpoint/hooks/cursor_test.go`](cli/beacon/internal/endpoint/hooks/cursor_test.go)+- [`cli/beacon/internal/endpoint/hooks/opencode_test.go`](cli/beacon/internal/endpoint/hooks/opencode_test.go)+- [`cli/beacon-hooks/cmd/opencode_event_test.go`](cli/beacon-hooks/cmd/opencode_event_test.go)+- [`collector-builder/exporter/beaconjsonexporter/exporter_test.go`](collector-builder/exporter/beaconjsonexporter/exporter_test.go)+- [`cli/beacon/internal/endpoint/elastic/elastic_test.go`](cli/beacon/internal/endpoint/elastic/elastic_test.go)++## Optional Full Teardown+Only run teardown if the user explicitly asks to remove the test state. Preserve notes and evidence under `$BEACON_E2E_RUN`.++```bash+beacon endpoint elastic down --pack-dir "$BEACON_E2E_RUN/beacon-elastic-pack" || true+beacon endpoint uninstall --keep-logs || true+```++If the user also asks to roll back runtime configuration, restore the timestamped backups manually and verify each restored file before continuing. Do not restore backups by default.++## Final Release Gate+Before considering fixes ready, run the focused tests for touched areas plus the standard release gates:++```bash+cd cli/beacon && go test ./...+cd cli/beacon && go test -race ./internal/endpoint/...+cd cli/beacon-hooks && go test ./...+cd collector-builder/exporter/beaconjsonexporter && go test ./...+sh packaging/macos/test-endpoint-scripts.sh+```++For any fix affecting install, hooks, collector packaging, or Elastic assets, rerun the affected slice of this runbook with a freshly installed Homebrew release or a release-candidate archive, and append the retest result to `beacon-installation-notes.md`.diff --git a/cli/beacon/.goreleaser.yaml b/cli/beacon/.goreleaser.yamlindex 288782a0..749035f5 100644--- a/cli/beacon/.goreleaser.yaml+++ b/cli/beacon/.goreleaser.yaml@@ -3,6 +3,11 @@ version: 2project_name: beacon+# Each target build embeds a platform-specific beacon-hooks binary by writing+# internal/embedded/hooks.bin in a pre-build hook. Keep release builds+# serialized so concurrent targets cannot race and embed the wrong architecture.+parallelism: 1+before:hooks:- go mod tidy@@ -36,9 +41,10 @@ builds:hooks:pre:# Build the hooks binary for this target platform and embed it.- # IMPORTANT: This writes to a shared hooks.bin file. The -a flag above- # forces a full rebuild for each target so Go re-reads the freshly-built- # hooks.bin instead of serving a stale copy from the build cache.+ # IMPORTANT: This writes to a shared hooks.bin file. Release builds are+ # serialized at the top level so target builds cannot race here. The -a+ # flag above forces a full rebuild for each target so Go re-reads the+ # freshly-built hooks.bin instead of serving a stale copy from cache.- cmd: bash -c 'cd ../beacon-hooks && GOOS={{ .Os }} GOARCH={{ .Arch }} go build -ldflags "-s -w -X github.com/asymptote-labs/agent-beacon/cli/beacon-hooks/internal/version.Version={{ .Version }}" -o ../beacon/internal/embedded/hooks.bin .'output: truediff --git a/cli/beacon/internal/endpoint/collector/collector.go b/cli/beacon/internal/endpoint/collector/collector.goindex 598ea5f7..ed4cf0ae 100644--- a/cli/beacon/internal/endpoint/collector/collector.go+++ b/cli/beacon/internal/endpoint/collector/collector.go@@ -115,6 +115,10 @@ func ConfigYAML(cfg endpointconfig.Config) string {if splunkExporter != "" {exporters = "[beaconjson, splunk_hec]"}+ runtimeMetricsYAML := ""+ if cfg.Collector.IncludeRuntimeMetrics {+ runtimeMetricsYAML = " include_runtime_metrics: true\n"+ }return fmt.Sprintf(`receivers:otlp:protocols:@@ -138,7 +142,6 @@ exporters:rotate_bytes: 10485760redact_secrets: truecontent_retention: %q- include_runtime_metrics: %t%sextensions:health_check:@@ -162,7 +165,7 @@ service:receivers: [otlp]processors: [memory_limiter, batch]exporters: %s-`, cfg.Collector.GRPCPort, cfg.Collector.HTTPPort, cfg.LogPath, cfg.ContentRetention, cfg.Collector.IncludeRuntimeMetrics, splunkExporter, exporters, exporters, exporters)+`, cfg.Collector.GRPCPort, cfg.Collector.HTTPPort, cfg.LogPath, cfg.ContentRetention, runtimeMetricsYAML+splunkExporter, exporters, exporters, exporters)}func splunkHECYAML(cfg endpointconfig.Config) string {diff --git a/cli/beacon/internal/endpoint/collector/collector_test.go b/cli/beacon/internal/endpoint/collector/collector_test.goindex 4216930a..bfc858ba 100644--- a/cli/beacon/internal/endpoint/collector/collector_test.go+++ b/cli/beacon/internal/endpoint/collector/collector_test.go@@ -41,7 +41,6 @@ func TestConfigYAMLIncludesReleaseContractFields(t *testing.T) {"max_event_bytes: 65536","rotate_bytes: 10485760","redact_secrets: true",- "include_runtime_metrics: false","level: none","receivers: [otlp]","exporters: [beaconjson]",@@ -50,6 +49,9 @@ func TestConfigYAMLIncludesReleaseContractFields(t *testing.T) {t.Fatalf("ConfigYAML missing %q:\n%s", want, yaml)}}+ if strings.Contains(yaml, "include_runtime_metrics") {+ t.Fatalf("ConfigYAML should omit runtime metrics option unless explicitly enabled:\n%s", yaml)+ }}func TestConfigYAMLIncludesRuntimeMetricsOptIn(t *testing.T) {diff --git a/cli/beacon/internal/endpoint/elastic/elastic_test.go b/cli/beacon/internal/endpoint/elastic/elastic_test.goindex 2cffcf23..dff7b713 100644--- a/cli/beacon/internal/endpoint/elastic/elastic_test.go+++ b/cli/beacon/internal/endpoint/elastic/elastic_test.go@@ -83,6 +83,7 @@ func TestPackJSONFilesAreValid(t *testing.T) {func TestKibanaAssetsAreParseableNDJSON(t *testing.T) {scanner := bufio.NewScanner(strings.NewReader(mustRead("pack/kibana-assets.ndjson")))line := 0+ var foundDataView boolfor scanner.Scan() {line++var doc map[string]interface{}@@ -92,6 +93,15 @@ func TestKibanaAssetsAreParseableNDJSON(t *testing.T) {if doc["type"] == "" || doc["id"] == "" {t.Fatalf("kibana-assets.ndjson line %d missing type/id: %#v", line, doc)}+ if doc["type"] == "index-pattern" {+ attrs, ok := doc["attributes"].(map[string]interface{})+ if !ok {+ t.Fatalf("kibana data view missing attributes: %#v", doc)+ }+ if attrs["name"] == "Beacon Endpoint Events" {+ foundDataView = true+ }+ }}if err := scanner.Err(); err != nil {t.Fatal(err)@@ -99,6 +109,25 @@ func TestKibanaAssetsAreParseableNDJSON(t *testing.T) {if line == 0 {t.Fatal("kibana-assets.ndjson was empty")}+ if !foundDataView {+ t.Fatal("kibana-assets.ndjson should include the Beacon Endpoint Events data view")+ }+}++func TestPackREADMEUsesIngestedFieldNames(t *testing.T) {+ readme := mustRead("pack/README.md")+ for _, want := range []string{+ "beacon.product:endpoint-agent",+ "beacon.prompt.text",+ "beacon.harness.name",+ } {+ if !strings.Contains(readme, want) {+ t.Fatalf("pack README missing ingested field query %q", want)+ }+ }+ if strings.Contains(readme, "product:endpoint-agent") && !strings.Contains(readme, "beacon.product:endpoint-agent") {+ t.Fatalf("pack README should not use raw pre-ingest product field query")+ }}func TestSampleEventsCoverHookAndOTelShapes(t *testing.T) {diff --git a/cli/beacon/internal/endpoint/elastic/pack/README.md b/cli/beacon/internal/endpoint/elastic/pack/README.mdindex 31d1cbd0..d8449bfc 100644--- a/cli/beacon/internal/endpoint/elastic/pack/README.md+++ b/cli/beacon/internal/endpoint/elastic/pack/README.md@@ -26,6 +26,14 @@ If those ports are already in use, set `BEACON_ELASTIC_ES_PORT` orThe Docker stack loads the ILM policy, component templates, index template,ingest pipeline, and starter Kibana saved objects before Filebeat ships events.+Validate ingestion with the ECS-adjacent fields produced by the ingest pipeline:++```bash+curl "$ES_HOSTS/logs-beacon.endpoint-*/_search?q=beacon.product:endpoint-agent"+curl "$ES_HOSTS/logs-beacon.endpoint-*/_search?q=beacon.prompt.text:%22Beacon%20E2E%22"+curl "$ES_HOSTS/logs-beacon.endpoint-*/_search?q=beacon.harness.name:cursor"+```+Stop it with:```bashdiff --git a/cli/beacon/internal/endpoint/elastic/pack/kibana-assets.ndjson b/cli/beacon/internal/endpoint/elastic/pack/kibana-assets.ndjsonindex d8b123b9..cc685eae 100644--- a/cli/beacon/internal/endpoint/elastic/pack/kibana-assets.ndjson+++ b/cli/beacon/internal/endpoint/elastic/pack/kibana-assets.ndjson@@ -1,2 +1,2 @@-{"type":"index-pattern","id":"beacon-endpoint-data-view","attributes":{"title":"logs-beacon.endpoint-*","timeFieldName":"@timestamp","name":"Beacon Endpoint"},"references":[],"coreMigrationVersion":"8.8.0","typeMigrationVersion":"8.0.0"}+{"type":"index-pattern","id":"beacon-endpoint-data-view","attributes":{"title":"logs-beacon.endpoint-*","timeFieldName":"@timestamp","name":"Beacon Endpoint Events"},"references":[],"coreMigrationVersion":"8.8.0","typeMigrationVersion":"8.0.0"}{"type":"search","id":"beacon-all-agent-activity","attributes":{"title":"Beacon: all agent activity","description":"All Beacon endpoint events","columns":["@timestamp","event.action","beacon.harness.name","user.name","message"],"sort":[["@timestamp","desc"]],"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"language\":\"kuery\",\"query\":\"event.dataset: beacon.endpoint\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"}},"references":[{"name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern","id":"beacon-endpoint-data-view"}],"coreMigrationVersion":"8.8.0","typeMigrationVersion":"8.0.0"}