Skip to content

Add continuous integration#3

Merged
rakyll merged 1 commit into
mainfrom
rakyll-patch-1
May 19, 2025
Merged

Add continuous integration#3
rakyll merged 1 commit into
mainfrom
rakyll-patch-1

Conversation

@rakyll
Copy link
Copy Markdown
Member

@rakyll rakyll commented May 19, 2025

No description provided.

@rakyll rakyll merged commit 22843a6 into main May 19, 2025
2 checks passed
@rakyll rakyll deleted the rakyll-patch-1 branch May 19, 2025 22:50
davidli2010 pushed a commit to davidli2010/adk-go that referenced this pull request Feb 4, 2026
wolo-lab added a commit that referenced this pull request May 12, 2026
…#1)

Same goal as wolo/context_unif_v2_pr1_move (eliminate the 3 pairs of
duplicate context impls + the duplicate internalArtifacts helper),
opposite execution: keeps existing implementations in agent/agent.go
instead of moving them to new files.

What's added to agent/agent.go (~146 lines):
  * internalArtifacts wrapper (delta-tracking for Save).
  * NewCallbackContext / NewCallbackContextWithDelta constructors.
  * artifacts field on callbackContext + updated Artifacts() to return
    the wrapper (bug fix: previously returned unwrapped Artifacts, so
    Save() in callbacks didn't record into EventActions.ArtifactDelta).
  * NewInvocationContext + InvocationContextParams.
  * readonlyContext struct + 8 methods + NewReadonlyContext.
  * InvocationOf helper (returns underlying InvocationContext from
    a NewReadonlyContext-produced ReadonlyContext).
  * runBeforeAgentCallbacks / runAfterAgentCallbacks switched from
    raw struct literal to newCallbackContextImpl (no behavioural
    change — the new bug fix takes effect either way).

What's removed:
  * internal/context/{invocation,callback,readonly}_context.go shrink
    to thin alias layers (var NewX = agent.NewX).
  * internal/context/context_test.go deleted (its TestWithContext
    sibling already exists in agent/agent_test.go; the other two
    tests can be re-added in agent/ if desired).
  * internal/toolinternal.internalArtifacts dropped (toolContext now
    relies on the embedded CallbackContext for Artifacts wrapping —
    eliminates double-wrapping bug).
  * util/instructionutil drops the icontext import; uses
    agent.InvocationOf instead of *icontext.ReadonlyContext type
    assertion.

Trade-off vs the canonical PR #1:
  * agent/agent.go grows from 521 to ~660 lines (mixing Agent + Run
    + Context impls + helpers in one file).
  * 7 files touched instead of 13; +168/-352 = -184 lines net,
    versus +489/-537 = -48 net for PR #1. ~136 lines smaller diff.
  * No new files in agent/ (3 fewer in git status).

This branch exists for comparison; whichever direction we pick gets
PRs #2 and #3 stacked on top.

Verified: go build ./...; go vet ./...; go test ./...; all pass.
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.

1 participant