Skip to content

core: remove unused single-bid adjustment helper - #77

Merged
nickpell merged 1 commit into
mainfrom
nick/remove-single-bid-adjustment
Sep 30, 2026
Merged

nickpell merged 1 commit into
mainfrom
nick/remove-single-bid-adjustment

Conversation

@nickpell

@nickpell nickpell commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Summary

Remove ApplySingleBidAdjustmentFactor, which has no callers in openauction or cloudexchange.ssp. The unused helper accepts zero and negative adjustment factors, while ApplyBidAdjustmentFactors ignores 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

  • No callers in either repository; deadcode -test ./... confirms the helper is unreachable from openauction tests.
  • Build passes: mise exec -- go build ./....
  • Lint passes: mise run //:lint.
  • Full test suite passes: mise run //:test.
  • Diff contains only the unused helper deletion; git diff --check passes.
  • GitHub Actions checks pass: test, lint, and Ratchet Lint.

Post-deploy/apply verification

  • Main-branch workflows passed for merge commit 5285447a66eee259d54b365d1e98f047c9b1947b: Go, Docker Build, and Build EIF. EIF publication to ECR, PCR validation update, and temporary builder cleanup succeeded.

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 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.

@nickpell
nickpell merged commit 5285447 into main Sep 30, 2026
4 checks passed
@nickpell
nickpell deleted the nick/remove-single-bid-adjustment branch September 30, 2026 21:07
@nickpell nickpell mentioned this pull request Oct 1, 2026
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.
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