Skip to content

enclaveapi: remove the unused URLEncode methods - #88

Merged
nickpell merged 1 commit into
mainfrom
nick/enclaveapi-delete-urlencode
Oct 2, 2026
Merged

nickpell merged 1 commit into
mainfrom
nick/enclaveapi-delete-urlencode

Conversation

@nickpell

@nickpell nickpell commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Remove AttestationDoc.URLEncode and AuctionAttestationDoc.URLEncode from enclaveapi/types.go. Neither method has a caller in this repository, in cloudx-io/openarbiter or in the in-org repositories that import this module. Both call json.Marshal and discard its error, so a marshal failure returns an empty string instead of an error.
  • The encoding/json and net/url imports in enclaveapi/types.go were used only by these methods and are removed with them. Struct fields keep their json tags.
  • The module has no release tags, so consumers pin pseudo-versions; an external caller would fail to build when it upgrades past this commit. core: remove unused single-bid adjustment helper #77, validation: remove unused ExtractCOSEPayload #81 and enclaveapi: remove the unused parsing package #83 removed unused exported API on the same basis.

Pre-merge checklist

  • No callers: on a fresh origin/main, an unfiltered git grep -nw URLEncode finds only the two definitions in this repository and nothing in cloudx-io/openarbiter or the in-org importers. On this branch it finds nothing.
  • Enclave dependency set unchanged: go list -deps ./enclave/... (host and GOOS=linux) is identical before and after. Built as in docker.yml with -buildvcs=false from the same path, the linux/amd64 and linux/arm64 enclave binaries are not byte-identical, but their symbol tables (names and sizes) are identical. The CI build embeds the commit SHA, so the PCRs for the merge commit change as they do for every commit.
  • Build and vet pass: go build ./... and go vet ./....
  • Lint passes: mise run //:lint (0 issues).
  • Tests pass: mise run //:test.
  • Diff contains only the two method deletions and their two imports; git diff --check passes.
  • GitHub Actions checks pass on this branch: Go (test, lint) and Ratchet Lint for aa87986.

Post-deploy/apply verification

  • The Go, Docker Build and Build EIF runs on main for the merge commit pass, including the update-pcrs job. (merge commit 9809057: Go, Docker Build and Build EIF green; update-pcrs pushed 0488919)

AttestationDoc.URLEncode and AuctionAttestationDoc.URLEncode have no callers and discard the json.Marshal error. Remove them and the encoding/json and net/url imports that only they used.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused cleanup is internally consistent and leaves required imports and call sites unaffected.

Review effort: Balanced
Findings: None

What changed in this PR

Removes two unused URL-encoding helpers and their obsolete imports from the enclave API.

Changes:

  • Removes URLEncode methods from both attestation types.
  • Removes unused encoding/json and net/url imports.
File Description
enclaveapi/​types.go Removes unused exported methods and imports.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@nickpell
nickpell merged commit 9809057 into main Oct 2, 2026
4 checks passed
@nickpell
nickpell deleted the nick/enclaveapi-delete-urlencode branch October 2, 2026 14:17
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