Refactor: delegate header serialization to AiMdHeaderCodec - #118
Merged
Conversation
…visional) Add a SpotBugs step to the fast code-style job (after Spotless, before the informational jdeps step) so spotbugs:check runs early on every PR/push, consistent with the other repos (publish-* already needs: code-style). The early gate surfaced a pre-existing, already-merged CE_CLASS_ENVY in PackageIndexer.appendPackageHeaderLines (it hand-renders a .ai.md header that AiMdHeaderCodec.write() already emits byte-for-byte). Provisionally suppress it and track the delegate-to-codec fix in TODO.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137c1LhUbNvW3kt4eF9Kqyb
appendPackageHeaderLines hand-rendered the package .ai.md header by appending all eight AiMdHeader accessors with AiMdHeaderCodec prefix constants — byte for byte the same output AiMdHeaderCodec.write(AiMdHeader) already produces (the same call AiMdDocumentCodec uses to serialise a header). fb-contrib flagged it as CE_CLASS_ENVY. Delegate to AiMdHeaderCodec.write() via a new headerCodec field, deleting the duplicated eight-field block. Output is byte-identical (PackageIndexerTest + AiMdDocumentCodecTest + AiMdHeaderCodecTest all green; compile clean through NullAway/ErrorProne; spotbugs 0 bugs with the suppression removed), so the provisional CE_CLASS_ENVY suppression is dropped rather than kept and the deep-check item is closed in TODO.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137c1LhUbNvW3kt4eF9Kqyb
bernardladenthin
had a problem deploying
to
startgate
June 26, 2026 06:56 — with
GitHub Actions
Error
|
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
PackageIndexer.appendPackageHeaderLines()and delegate toAiMdHeaderCodec.write(), establishing a single source of truth for.ai.mdheader layoutAiMdHeaderCodecas a field inPackageIndexerto enable the delegationAiMdDocumentCodecfor consistencyTest plan
Related issues / PRs
Checklist
CONTRIBUTING.mdandCODE_OF_CONDUCT.mdhttps://claude.ai/code/session_0137c1LhUbNvW3kt4eF9Kqyb