Skip to content

enclaveapi: remove the unused parsing package - #83

Merged
nickpell merged 1 commit into
mainfrom
nick/remove-enclaveapi-parsing
Oct 1, 2026
Merged

nickpell merged 1 commit into
mainfrom
nick/remove-enclaveapi-parsing

Conversation

@nickpell

@nickpell nickpell commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Delete the enclaveapi/parsing package. Its three exported functions (FormatPCR, EncodeCertificateBundle and ExtractPCRs) have no importers in this repository, in cloudx-io/openarbiter or in the private CloudX repositories that consume this module. AttestationCOSE.ParseAttestationDoc() in enclaveapi/types.go already does the same PCR formatting (through its own unexported formatPCR) and certificate-bundle encoding.
  • The enclave binary does not import the package. go list -deps ./enclave/... (with and without -test) is identical before and after the deletion. With the CI build flags and -buildvcs=false, the enclave binary is byte-identical before and after for linux/amd64 and linux/arm64. The CI build embeds the commit SHA, so the PCRs recorded for the merge commit differ from the previous entry, as they do for every commit.

Notes for reviewers

Pre-merge checklist

  • No importers: an unfiltered git grep -n 'enclaveapi/parsing' on a fresh origin/main of this repository, cloudx-io/openarbiter and the consuming private repositories returns nothing, and deadcode -test ./... reports all three functions as unreachable.
  • Enclave dependency graph unchanged: go list -deps ./enclave/... and go list -deps -test ./enclave/... are identical before and after, and the -buildvcs=false enclave binaries are byte-identical for linux/amd64 and linux/arm64.
  • Build passes: go build ./... and go vet ./....
  • Lint passes: mise run //:lint (0 issues) and mise run //:tidy.
  • Tests pass: go test ./....
  • GitHub Actions checks pass on this branch: Go (test, lint), Ratchet Lint and Docker Build.
  • Diff contains only the deletion of enclaveapi/parsing/nitro.go.

Post-deploy/apply verification

  • The next Go, Docker Build and Build EIF runs on main pass for the merge commit, including the update-pcrs job. On merge commit fe1e0750: Go 36919725479, Docker Build 36920348257 and Build EIF 36920823495 succeeded, and update-pcrs pushed d21ae936e.

FormatPCR, EncodeCertificateBundle and ExtractPCRs have had no importers since AttestationCOSE.ParseAttestationDoc replaced them in #14. The enclave binary does not import the package.

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

Repository searches confirm no remaining imports or references to the deleted API.

Review effort: Balanced
Findings: None

What changed in this PR

Removes the unused enclaveapi/parsing package after its functionality moved into enclaveapi/types.go.

Changes:

  • Deletes three unused parsing helpers.
  • Removes the obsolete package entirely.
File Description
enclaveapi/​parsing/​nitro.go Deletes unused PCR and certificate parsing utilities.

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

@nickpell
nickpell merged commit fe1e075 into main Oct 1, 2026
4 checks passed
@nickpell
nickpell deleted the nick/remove-enclaveapi-parsing branch October 1, 2026 20:11
nickpell added a commit that referenced this pull request Oct 2, 2026
## 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.
#77, #81 and #83 removed unused exported API on the
same basis.

## Pre-merge checklist

- [x] 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.
- [x] 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.
- [x] Build and vet pass: `go build ./...` and `go vet ./...`.
- [x] Lint passes: `mise run //:lint` (0 issues).
- [x] Tests pass: `mise run //:test`.
- [x] Diff contains only the two method deletions and their two imports;
`git diff --check` passes.
- [x] 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.
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