Commit Graph

23 Commits

Author SHA1 Message Date
pulse-triage[bot]
7de796f72d Reject unconfirmed CLI action acknowledgements
Bind plans to their request and decisions/executions to the requested action before writing success JSON. Require explicit allowed/state, preserve replayed and in-flight outcomes, and advise audit inspection rather than blind POST retries.

Contract-Neutral: CLI-only validation of existing action response bindings and required outcome fields; no API schema, authorization, routing or server lifecycle change.
Change-source: pulse-maintainer
2026-11-11 16:44:05 +00:00
pulse-triage[bot]
628f2f0f85 Bind CLI capability results to the requested resource
Reject missing, blank and mismatched resource identities before reporting capability availability. Preserve bound resources with omitted, null or empty capabilities because the actual facets handler omits an empty capabilities field. Registered command regressions cover fixed and chunked envelopes, populated output, HTTP refusals, request identity and typed output. Same-origin TLS controls use the existing canonical empty facets wire shape without changing redirect policy.

Contract-Neutral: Enforce the existing resource binding in native capability reads; preserve matching capability output, optional empty facets, API schemas, authentication, grants, routes and execution behavior.
Change-source: pulse-maintainer
2026-11-11 15:47:15 +00:00
pulse-triage[bot]
49e4d34679 Reject incomplete and unbound CLI action history responses
Do not invent empty action history or overwrite a missing response identity after a successful HTTP status. Require explicit collections and counts, verify the count and requested action/resource binding, and preserve canonical arrays and legacy null-empty responses. Registered command tests exercise fixed/chunked envelopes, valid output, HTTP refusals and request identity without retries. Positive TLS redirect fixtures return the existing canonical history schema; redirect, bearer and caller-policy assertions stay unchanged.

Contract-Neutral: Enforce existing action history response collections, counts and request identities in CLI reads; preserve valid output, null-empty compatibility, API payloads, grants, filters and execution behavior.
Change-source: pulse-maintainer
2026-11-11 13:37:28 +00:00
pulse-triage[bot]
ea83022b25 Return canonical fleet data in CLI TLS redirect controls
The positive same-origin TLS fixture must return the real connections envelope after the CLI stops inventing an empty inventory. Supply an explicit empty array only for the fleet read; keep every redirect, TLS trust, bearer, body, request-count and client-policy assertion unchanged. The two failures at 48d4b1014d remain retained evidence.

Contract-Neutral: Correct only the positive test fixture to the existing connections envelope; no runtime, authority or TLS contract changes.
Change-source: pulse-maintainer
2026-11-11 12:42:37 +00:00
pulse-triage[bot]
48d4b1014d Reject unknown fleet inventory in CLI reads
The canonical connections handler emits an explicit array, including [] for an empty scope. The CLI instead converted null or missing inventories into a successful empty fleet. Return a response error before writing JSON and preserve valid empty/populated output, request authority and existing HTTP error handling. Registered command tests cover fixed and chunked HTTP responses, response errors and forward-compatible row fields.

Contract-Neutral: Preserve the existing connections array schema and valid CLI output; reject missing or null inventories instead of inventing an empty fleet.
Change-source: pulse-maintainer
2026-11-11 12:35:15 +00:00
pulse-triage[bot]
2eee21630d Keep interactive configuration backup prompts off stdout
Send passphrase prompts and confirmation diagnostics to stderr, respecting each command's configured diagnostic writer, so a redirected interactive export remains an importable encrypted archive. Exercise confirmation/read failures, silent env and flag paths, and actual interactive export/import with saved scoped access.

Contract-Neutral: Native CLI human passphrase stream correction only; archive encryption and format, command flags, env/flag precedence, terminal password reading, saved formats and authority, HTTP responses and frontend states are unchanged.
Change-source: pulse-maintainer
2026-11-11 05:26:35 +00:00
pulse-triage[bot]
9e48307116 Report incomplete stdout configuration backups as failures
Propagate rejected, partial and uncertain stdout archive writes and classify a short count without an error as io.ErrShortWrite. Never retry an output that may contain part of the backup. Exercise the native command with failed and successful destinations and retain saved-token/SSO recovery through the unchanged successful archive.

Contract-Neutral: Native CLI stdout write-completion reporting only; successful archive bytes, flags, private file publication, saved formats, grants, routes and web responses or rendered states are unchanged.
Change-source: pulse-maintainer
2026-11-11 03:29:38 +00:00
pulse-triage[bot]
57d43f32e7 Preserve private CLI backups until export completes
Publish CLI configuration exports from an exclusively created owner-only file in the selected output directory, after full write, sync and close. Preserve the prior backup on every pre-publication error, report cleanup errors, refuse non-regular final destinations and do not rewrite another hard-linked file. Keep existing encrypted archives, stdout, flags and token/SSO authority unchanged; exercise fault paths and actual CLI recovery.

Contract-Neutral: Native CLI file publication only; command flags, encrypted archive and saved formats, authorization rules, routes, web responses and rendered states remain unchanged.
Change-source: pulse-maintainer
2026-11-11 02:30:20 +00:00
pulse-triage[bot]
a82106a579 Refuse to replace invalid saved encryption keys
Treat corrupt primary and corrupt or unreadable legacy key material as existing authority, not a request for migration or first-run replacement. Preserve exact key and saved-state bytes, return actionable non-secret errors, and keep valid-key reuse, clean first run and valid legacy migration intact.

Exercise real bootstrap, configuration and CLI consumers through refusal and explicit original-key restoration. Update the at-rest key contract and retain synthetic baseline failures as evidence.

Change-source: pulse-maintainer
2026-11-09 12:52:57 +00:00
pulse-triage[bot]
47b197a6a2 Keep CLI API requests within the configured Pulse origin
Use the existing guarded transport for authenticated fleet reads and action commands. Preserve same-origin proxy paths and caller TLS or stricter policies without duplicating the redirect boundary.

Change-source: pulse-maintainer
2026-11-02 06:56:17 +00:00
pulse-triage[bot]
7966a309f0 Exercise CLI API redirect confidentiality
Cover every registered authenticated fleet and action command through actual loopback servers, including replayable action bodies and same-origin TLS redirects.

Contract-Neutral: Registered CLI regression tests only; runtime and existing API contracts are unchanged.
Change-source: pulse-maintainer
2026-11-02 06:49:07 +00:00
rcourtman
cd7886aa44 Enforce server-owned action approval authority 2026-07-11 19:49:17 +01:00
rcourtman
f7aa9ee922 Remove unreachable exported functions from pkg/
Dead-code audit batch 1: five functions with zero references from main,
tests, or pulse-enterprise (deadcode -test, grep-verified per symbol,
enterprise compile-checked). Also renames the tlsutil test that
exercised the deleted compat alias's target to name the Unverified
function it actually calls.

Skipped from the audit list after re-verification: IsNilAlertPayload
(live pulse-enterprise consumer in internal/aialertanalysis).
2026-07-10 00:27:35 +01:00
rcourtman
6340cd36f2 Dedupe internal/api handler families behind shared flows and generics
Clears the sixteen dupl pair groups in internal/api plus the pkg/pulsecli
pair:

- router.go: privileged settings endpoints share the
  serveSetupTokenOrSettingsWrite gate; patrol findings convert via one
  unifiedFindingFromAI; the five infrastructure-summary chart loops share
  collectGuestChartData / fillChartSeriesFromBatch; the VM/LXC workloads
  summary loops share appendGuestWorkloadSummaries.
- deploy_handlers.go: preflight and job status/SSE handlers share
  handleDeployJobStatus / handleDeployJobEvents.
- recovery_handlers.go: points series/facets share
  parseRecoveryListPointsOptions.
- truenas_handlers.go / vmware_handlers.go / router_routes_registration.go:
  the connection update flow (locate, decode-with-fallback, normalize,
  preserve masked secrets, validate, save, redact) moves to the new
  platform_connection_shared.go (updatePlatformConnection +
  decodeOptionalInstanceRequest + the admin-gated item-route builder);
  per-platform wrappers carry nolint'd declarative wiring only.
- docker_metadata.go / guest_metadata.go: GET/PUT payload semantics move
  to metadata_handlers_shared.go; the zero-record-instead-of-404 contract
  is pinned by TestContract_MetadataGetPayloadsUseZeroRecordsInsteadOf404.
- kubernetes_agents.go / docker_agents.go: lifecycle PUTs share
  per-handler action helpers.
- config_node_handlers.go: PBS/PMG probes share
  testProxmoxPlatformConnection.
- cloud_handoff_handlers.go / purchase_return_redemptions.go: secrets
  sqlite stores open through openHardenedSecretsDB so permission
  hardening stays single-sourced.
- ai_handlers.go / chat_service_adapter.go: the GetMessages adapters are
  deliberate contract mirrors — suppressed with nolint and enforced by
  TestOrchestratorAndChatAdaptersMapTheSameMessageFields.
- pkg/pulsecli/actions.go: action subcommands seed env defaults via
  actionAPIDefaults (tested); the audit/events cobra registration pair is
  nolint'd parallel wiring.
- .golangci.yml: exclude gitignored tmp/ from ./... typechecking.
- subsystem_lookup_test.py: refresh the pinned api-contracts.md line
  numbers shifted by the contract additions.

golangci-lint run ./... is now fully green. Full internal/api and
pkg/pulsecli test suites pass.
2026-06-10 10:52:05 +01:00
rcourtman
faefe6edc8 Remove 198 unreachable Go functions
Dead-code sweep. Functions flagged unreachable by golang.org/x/tools/cmd/deadcode
and confirmed unused across pulse, pulse-enterprise, pulse-pro and pulse-mobile by
adversarial cross-repo verification. Cross-module reachability was checked
explicitly (only pkg/ exported symbols are importable by other modules; internal/
packages and _test.go files are not). go build, go vet and test-compile all pass.
2026-06-03 12:29:37 +01:00
rcourtman
82a2494ffa Add action execution safety contract 2026-05-04 23:19:58 +01:00
rcourtman
2040285085 Add action decision API 2026-05-04 22:56:55 +01:00
rcourtman
c436e1a2a2 Add CLI fleet connection reads 2026-05-04 08:40:34 +01:00
rcourtman
863f214c10 Add CLI action audit reads 2026-05-04 00:18:19 +01:00
rcourtman
f0bf88a89d Add CLI action capability discovery 2026-05-04 00:10:15 +01:00
rcourtman
5fbe723ad9 Add CLI action planning adapter 2026-05-04 00:05:21 +01:00
rcourtman
a3f99a271b Curate demo-facing mock data across platform views 2026-03-31 18:05:55 +01:00
rcourtman
778a2577b6 feat: Pulse v6 release 2026-03-18 16:06:30 +00:00