Skip to content

Harden fact discovery, snapshot decoding, and release validation - #34

Merged
ncode merged 24 commits into
mainfrom
review/discovery-and-release-correctness
Nov 30, 2026
Merged

ncode merged 24 commits into
mainfrom
review/discovery-and-release-correctness

Conversation

@ncode

@ncode ncode commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

This PR brings 19 implementation commits up to date with the invocation-local discovery defaults and resolver scheduling already on main.

Changes

  • Prevent EC2 metadata discovery from collecting role credentials, reject metadata redirects, and apply disable rules before eligible callbacks run.
  • Preserve source precedence, cache isolation, exact numeric values, and nested disable behavior across full, scoped, cached, and cancelled discovery. Limit literal queries to the core probes that can contribute a result.
  • Preserve structured YAML and HOCON output and reject fixed-array shape mismatches in the Go API.
  • Correct primary-interface IPv4 reporting, Linux route and storage parsing, and BSD byte counts. Bound filesystem capacity probes and share outstanding work for the same mount.
  • Pin release gates to the packaged commit, require the Linux workload checks, and protect distribution archives and checksum publication from overlapping writers.
  • Build with Go 1.26.11 or newer. CI, release packaging, and the Linux development bootstrap use the module directive as their version source.
  • Cover partial bulk mount snapshots, higher-priority nested values, and mixed-key maps inside typed rows with regression tests.
  • Omit the conditional OS release when uname returns no data on macOS, DragonFly BSD, NetBSD, and OpenBSD. A four-platform fixture reproduces the schema failure found by native CI.
  • Isolate fake-time mount tests from process-wide probe workers and run the DragonFly discovery test packages sequentially to reduce competition for probe deadlines.

Compatibility

Library callers that want persistent named caching for registered or external facts must supply WithCacheNamespace. Existing named entries rebuild on first use. Dynamic numbers decoded by facts.As use json.Number. Review access to previously exported EC2 inventory that may have included credentials.

Verification

The integrated checkout passed go test -count=1 ./..., go test -race . ./internal/engine ./internal/app, go vet ./..., make build, and openspec validate --all --strict on macOS. On Go 1.26.11, go tool govulncheck ./... reported zero vulnerabilities affecting the code. Earlier validation of the implementation commits included the full Linux suite, a multihomed Linux CLI regression, Ruby parser round trips, and verification of all 17 release archive checksums.

@ncode
ncode marked this pull request as ready for review November 29, 2026 19:10
@ncode
ncode merged commit c9657cd into main Nov 30, 2026
40 checks passed
@ncode
ncode deleted the review/discovery-and-release-correctness branch November 30, 2026 06:35
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.

1 participant