Refactor/split agent go#503
Merged
AbirAbbas merged 4 commits intoAgent-Field:mainfrom Apr 28, 2026
Merged
Conversation
Move RegisterReasoner out of agent.go into agent_register.go as a pure file split to reduce file size and keep behavior unchanged. Made-with: Cursor
Move lifecycle and server orchestration methods out of agent.go into agent_lifecycle.go with no behavior changes. Made-with: Cursor
Move DID initialization and VC helper methods out of agent.go into agent_did.go as pure method moves. Made-with: Cursor
AbirAbbas
previously approved these changes
Apr 27, 2026
Contributor
Performance
✓ No regressions detected |
Contributor
📊 Coverage gateThresholds from
✅ Gate passedNo surface regressed past the allowed threshold and the aggregate stayed above the floor. |
Contributor
📐 Patch coverage gateThreshold: 80% on lines this PR touches vs
✅ Patch gate passedEvery surface whose lines were touched by this PR has patch coverage at or above the threshold. |
Contributor
|
appreciate the PR! needs more test coverage from coverage-summary ci |
Add focused tests for the new lifecycle, DID, and registration files
Contributor
Author
|
@AbirAbbas Could you please check it again |
AbirAbbas
approved these changes
Apr 28, 2026
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.
What was extracted
agent_register.goRegisterReasoneragent_lifecycle.goInitializeRunServeregisterNodewaitForApprovalmarkReadystartServerstartLeaseLoopshutdownregisteredHeartbeatIntervalagent_did.goDIDManagerVCGeneratorinitializeDIDSystemfillDIDContextmaybeGenerateVCshouldGenerateVCBefore / After size
agent.go): 2184 LOC (issue baseline)agent.go): 1713 LOCCommits
a902eedrefactor(sdk-go): split reasoner registration methods09c77bdrefactor(sdk-go): split agent lifecycle methods2cb21f1refactor(sdk-go): split DID and VC methodsTest evidence
Ran the required package tests after each extraction and at the end:
cd sdk/go && go test ./agent/... -count=1Final result:
ok github.com/Agent-Field/agentfield/sdk/go/agentRelated issues
Fixes #413