You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most orfe e2e stories prove that a top-level OpenCode agent can invoke orfe and produce the expected GitHub side effects. However, orfe depends on context.agent, so we also need a dedicated OpenCode-integration story that proves delegated execution preserves the sub-agent caller identity rather than the parent agent identity.
This is not primarily a GitHub API story. It is an OpenCode integration story that validates the wrapper boundary used by orfe:
a parent OpenCode agent delegates work to a sub-agent
the sub-agent invokes orfe
orfe resolves the sub-agent caller name from context.agent
repo config maps that caller name to the correct GitHub role
the resulting GitHub artifact shows the sub-agent’s mapped bot identity, not the parent’s
Desired outcome
Add a live e2e test that proves the following story:
As a parent synthetic OpenCode agent, when I delegate a GitHub-writing action to a different synthetic sub-agent, orfe resolves and uses the delegated sub-agent identity rather than my own.
orfe-e2e config exists and defines at least two mapped synthetic agents:
orfe-e2e-operator -> 0RF3-0P3R470R-BOT
orfe-e2e-author -> 0RF3-4U7H0R-BOT
both synthetic agents are available in the OpenCode runtime
a low-cost or free OpenCode model is configured for the synthetic e2e agents
a fixture issue exists in orfe-e2e that is safe for repeated comment-based testing, or the test creates one through a prerequisite step if that is the chosen fixture strategy
the run uses a unique run identifier
the test does not depend on artifacts created by prior runs except for approved reusable fixtures
Agent model for this story
This story should involve two different synthetic agents:
a parent agent: orfe-e2e-operator
a delegated sub-agent: orfe-e2e-author
The important distinction is:
the parent agent initiates the run and delegates the action
the sub-agent performs the actual orfe invocation
the resulting GitHub side effect must use the sub-agent’s mapped GitHub identity
Command under test
This story should exercise:
orfe issue comment
through the real OpenCode-integrated path.
The story must run through OpenCode and actual sub-agent delegation, not through direct core invocation.
Suggested test flow
Generate a unique run id.
Start the test through opencode run using orfe-e2e-operator as the parent agent.
Have the parent agent delegate a task to orfe-e2e-author.
Through the delegated sub-agent, invoke orfe issue comment on the chosen fixture issue with a body containing the run id and clear delegation markers.
Capture the structured output from the command.
Verify the resulting GitHub comment exists on the expected issue.
Verify the visible GitHub actor identity is 0RF3-4U7H0R-BOT.
Verify the visible actor identity is not0RF3-0P3R470R-BOT.
Context
Issue #31 defines the live e2e contract for
orfe.Most
orfee2e stories prove that a top-level OpenCode agent can invokeorfeand produce the expected GitHub side effects. However,orfedepends oncontext.agent, so we also need a dedicated OpenCode-integration story that proves delegated execution preserves the sub-agent caller identity rather than the parent agent identity.This is not primarily a GitHub API story. It is an OpenCode integration story that validates the wrapper boundary used by
orfe:orfeorferesolves the sub-agent caller name fromcontext.agentDesired outcome
Add a live e2e test that proves the following story:
Dependencies
orfeinorfe-e2e#31orfe issue comment#17 (orfe issue comment)orfedesign/spec from Design theorfecustom tool and CLI contract #13Preconditions
The story must assume and require:
orfe-e2erepository existsorfe-e2econfig exists and defines at least two mapped synthetic agents:orfe-e2e-operator->0RF3-0P3R470R-BOTorfe-e2e-author->0RF3-4U7H0R-BOTorfe-e2ethat is safe for repeated comment-based testing, or the test creates one through a prerequisite step if that is the chosen fixture strategyAgent model for this story
This story should involve two different synthetic agents:
orfe-e2e-operatororfe-e2e-authorThe important distinction is:
orfeinvocationCommand under test
This story should exercise:
orfe issue commentthrough the real OpenCode-integrated path.
The story must run through OpenCode and actual sub-agent delegation, not through direct core invocation.
Suggested test flow
opencode runusingorfe-e2e-operatoras the parent agent.orfe-e2e-author.orfe issue commenton the chosen fixture issue with a body containing the run id and clear delegation markers.0RF3-4U7H0R-BOT.0RF3-0P3R470R-BOT.orfeinorfe-e2e#31.Required assertions
The test should explicitly assert all of the following:
OpenCode/runtime assertions
orfe-e2e-operatoras the parent agentorfe-e2e-authororfecustom tool loads successfully in delegated executionorfeinvocationTool output assertions
orfe issue commentexits successfullyGitHub artifact assertions
orfe-e2eActor identity assertions
0RF3-4U7H0R-BOT0RF3-0P3R470R-BOTIsolation assertions
Output / evidence requirements
The test should record enough evidence to debug failures, including:
Cleanup / isolation
Follow the policy defined in #31.
If comments are retained rather than deleted, they must remain clearly tagged by run id.
Acceptance criteria
orfe issue commentfrom the delegated sub-agentorfeorfe-e2e0RF3-4U7H0R-BOTactor identityorfeinorfe-e2e#31Non-goals