Repository navigation
core: remove unused single-bid adjustment helper - #77
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The deletion has no remaining callers and does not affect the active adjustment implementation.
Review effort: Balanced
Findings: None
What changed in this PR
Removes an unused single-bid adjustment helper while preserving the active batch adjustment path.
Changes:
- Deletes
ApplySingleBidAdjustmentFactor. - Leaves required imports and batch behavior unchanged.
| File | Description |
|---|---|
core/bidadjustments.go |
Removes the unused helper. |
💡 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 1, 2026
## 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 - #9 added the package as shared parsing utilities to remove duplicated code. #14 moved that parsing into `AttestationCOSE.ParseAttestationDoc()` and removed every import of the package, so that reason no longer applies. - The module has no release tags, so consumers pin pseudo-versions. An external importer of `enclaveapi/parsing` would fail to build when it upgrades past this commit. GitHub code search for `enclaveapi/parsing` returns no results. #77 removed unused exported API on the same basis. ## Pre-merge checklist - [x] 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. - [x] 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. - [x] Build passes: `go build ./...` and `go vet ./...`. - [x] Lint passes: `mise run //:lint` (0 issues) and `mise run //:tidy`. - [x] Tests pass: `go test ./...`. - [x] GitHub Actions checks pass on this branch: Go (test, lint), Ratchet Lint and [Docker Build](https://github.com/cloudx-io/openauction/actions/runs/36876325009). - [x] 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.
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
Remove
ApplySingleBidAdjustmentFactor, which has no callers in openauction or cloudexchange.ssp. The unused helper accepts zero and negative adjustment factors, whileApplyBidAdjustmentFactorsignores them.This supersedes the single-helper deletion in #44. That PR's broader removal of bid adjustments remains separate.
Notes for reviewers
The review of #44 requires demand-partner coordination for its attestation changes. This deletion preserves the batch adjustment path and the attestation format, so that condition does not apply here.
Pre-merge checklist
deadcode -test ./...confirms the helper is unreachable from openauction tests.mise exec -- go build ./....mise run //:lint.mise run //:test.git diff --checkpasses.Post-deploy/apply verification
5285447a66eee259d54b365d1e98f047c9b1947b: Go, Docker Build, and Build EIF. EIF publication to ECR, PCR validation update, and temporary builder cleanup succeeded.