enclaveapi: remove the unused parsing package - #83
Merged
Merged
Conversation
FormatPCR, EncodeCertificateBundle and ExtractPCRs have had no importers since AttestationCOSE.ParseAttestationDoc replaced them in #14. The enclave binary does not import the package.
There was a problem hiding this comment.
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.
8 tasks done
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
enclaveapi/parsingpackage. Its three exported functions (FormatPCR,EncodeCertificateBundleandExtractPCRs) have no importers in this repository, in cloudx-io/openarbiter or in the private CloudX repositories that consume this module.AttestationCOSE.ParseAttestationDoc()inenclaveapi/types.goalready does the same PCR formatting (through its own unexportedformatPCR) and certificate-bundle encoding.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
AttestationCOSE.ParseAttestationDoc()and removed every import of the package, so that reason no longer applies.enclaveapi/parsingwould fail to build when it upgrades past this commit. GitHub code search forenclaveapi/parsingreturns no results. core: remove unused single-bid adjustment helper #77 removed unused exported API on the same basis.Pre-merge checklist
git grep -n 'enclaveapi/parsing'on a freshorigin/mainof this repository, cloudx-io/openarbiter and the consuming private repositories returns nothing, anddeadcode -test ./...reports all three functions as unreachable.go list -deps ./enclave/...andgo list -deps -test ./enclave/...are identical before and after, and the-buildvcs=falseenclave binaries are byte-identical for linux/amd64 and linux/arm64.go build ./...andgo vet ./....mise run //:lint(0 issues) andmise run //:tidy.go test ./....enclaveapi/parsing/nitro.go.Post-deploy/apply verification
update-pcrsjob. On merge commitfe1e0750: Go 36919725479, Docker Build 36920348257 and Build EIF 36920823495 succeeded, andupdate-pcrspushedd21ae936e.