Skip to content

feat: receipt + egress guard — make qmax-local-agent the canonical, auditable source - #7

Merged
Desperado merged 2 commits into
mainfrom
feat/receipt-and-egress-guard
Jul 13, 2026
Merged

feat: receipt + egress guard — make qmax-local-agent the canonical, auditable source#7
Desperado merged 2 commits into
mainfrom
feat/receipt-and-egress-guard

Conversation

@Desperado

Copy link
Copy Markdown
Contributor

What

Brings the public qmax-local-agent up to the current QualityMax agent source (it was ~1 month behind) and adds the Exposure Receipt + egress guard, so this public repo becomes the canonical, auditable source that emits the receipts — the "develop-in-the-open" model (same pattern as qmax-code).

Why

The "Receipts, not promises" trust model says "audit the open source that emits the receipts." That only holds if the public source is what builds the customer's binary. Until now this repo lagged the monorepo and didn't contain the receipt code at all — audited ≠ built. This closes that gap.

Changes

  • New packages: httpx/ (the single egress chokepoint — a recording RoundTripper — plus the static guard guard_test.go that forbids un-instrumented HTTP outside httpx), policy/ (runtime allow-list, warn/strict), exposure/ (traffic taxonomy + Classify).
  • Imports the shared schema module github.com/Quality-Max/qmax-receipt (v0.1.0, MIT) — one versioned, offline-verifiable receipt format.
  • cmd_receipt.go (qmax receipt list|show|verify), cmd_skill_feedback.go.
  • Agent threads a per-run receipt via context; all egress now flows through httpx.
  • Makefile + release.yml stamp agent_build_sha via -ldflags -X …/qmax-receipt.BuildSHA=$SHA (was always "dev").
  • Ported this repo's extra tests to the new ctx-threaded / httpx API — no coverage dropped.

Verification

  • go build ./..., go vet ./..., go test ./... all green locally.
  • The static egress guard runs via this repo's ci.yml go test, so un-receipted egress can't merge here — the enforcement the trust model depends on.

Follow-up (not in this PR)

  • Config/state dir stays ~/.qamax here; unifying to ~/.qmax with a first-run migration is a separate PR (renaming would orphan existing auth + the agent signing key without a migration).

Syncs the qmax local agent to the current QualityMax source (was ~1 month
behind): adds the Exposure Receipt + egress guard and rewires all internal
imports to this repo's module path.

- New packages: httpx/ (single egress chokepoint + static guard), policy/
  (runtime allow-list), exposure/ (traffic taxonomy).
- Imports the shared schema module github.com/Quality-Max/qmax-receipt.
- cmd_receipt.go (qmax receipt list|show|verify), cmd_skill_feedback.go.
- Agent threads a per-run receipt via context; all egress flows through httpx.
- Makefile + release.yml stamp agent_build_sha via -ldflags -X (was "dev").
- Ported this repo's extra tests to the new ctx-threaded / httpx API; no
  coverage dropped.

Part of "Receipts, not promises": develop-in-the-open — this public repo
becomes the canonical, auditable source that emits the receipts. ci.yml's
go test runs the static egress guard, so un-receipted egress can't merge here.

Config/state dir stays ~/.qamax for now; unifying to ~/.qmax with a migration
is a separate follow-up PR.
@socket-security

socket-security Bot commented Jul 13, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedgithub.com/​Quality-Max/​qmax-receipt@​v0.1.0100100100100100

View full report

@qualitymaxapp

qualitymaxapp Bot commented Jul 13, 2026

Copy link
Copy Markdown

✅ QualityMax Pipeline

Gate Result
🔍 AI Review ✅ Clean
🧪 Repo Tests ✅ 232/269 passed (go)

Powered by QualityMax — AI-Powered Test Automation

The port overwrote this repo's errcheck-clean files with monorepo versions that
don't check some error returns. Restore lint-cleanliness: '_ =' for intentional
ignores (fs.Parse on ExitOnError FlagSets, best-effort chromedp.Sleep, Shutdown
in shutdown paths, best-effort browser open) and real handling for json.Unmarshal
(warn, matching nearby best-effort localStorage capture). No behavior change.
@Desperado
Desperado merged commit fbe689f into main Jul 13, 2026
5 checks passed
@Desperado
Desperado deleted the feat/receipt-and-egress-guard branch July 13, 2026 08:33
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