Context
Issue #31 defines the live e2e contract for orfe in orfe-e2e.
This story should validate a real OpenCode-integrated pull request comment path for orfe-e2e PR collaboration:
the OpenCode custom tool loads
context.agent is available
the wrapper passes caller identity into orfe
orfe-e2e repo config maps that caller name to the correct GitHub App identity
orfe posts a real comment on a orfe-e2e pull request through the live GitHub API
This story should use orfe-e2e-operator , not a production persona.
Desired outcome
Add a live e2e test that proves the following story:
As orfe-e2e-operator, I can invoke orfe through OpenCode to post a comment on a orfe-e2e pull request, and the resulting GitHub artifact reflects the expected comment content, target PR identity, and GitHub actor identity.
Dependencies
Preconditions
The story must assume and require:
a dedicated orfe-e2e repository exists
a orfe-e2e pull request fixture exists for the run, or the test provisions one through an approved fixture path documented in the test
the fixture PR is in a commentable state and remains accessible for the duration of the test
the test documents precisely how the PR fixture is created, identified, and isolated by run id
orfe-e2e orfe config exists and points at the orfe-e2e repository
orfe-e2e orfe config defines the orfe-e2e-operator caller name mapped to the 0RF3-0P3R470R-BOT GitHub App identity
a low-cost or free OpenCode model is configured for orfe-e2e-operator
0RF3-0P3R470R-BOT is installed and authorized for the orfe-e2e repository
the e2e run uses a unique run identifier
the test does not depend on artifacts created by prior runs except for explicitly documented reusable orfe-e2e infrastructure
Agent model for this story
This story should use the orfe-e2e-operator synthetic e2e agent defined only for orfe-e2e use.
The test must not depend on the production Jelena persona definition.
What matters here is:
OpenCode passes orfe-e2e-operator through context.agent
orfe-e2e config maps that caller name to the 0RF3-0P3R470R-BOT GitHub App identity
orfe executes under the correct dedicated e2e GitHub App identity
Commands under test
The story should exercise these orfe commands through the real OpenCode-integrated path:
orfe pr get
orfe pr comment
The story must run through OpenCode, not by calling the orfe core directly.
Suggested test flow
Generate a unique run id for the test.
Ensure a orfe-e2e PR fixture exists and is uniquely attributable to the run.
Invoke OpenCode with orfe-e2e-operator.
Through that agent, call orfe pr get for the fixture PR context and capture structured output.
Verify the read output identifies the intended PR fixture.
Through the same agent, call orfe pr comment with a comment body containing the run id and deterministic content.
Capture the structured output from the comment command.
Verify the resulting PR comment on GitHub matches the expected body and is attached to the intended PR.
Verify the visible GitHub actor identity is 0RF3-0P3R470R-BOT where GitHub exposes it.
Apply the agreed cleanup/isolation policy from Define the live e2e test contract for orfe in orfe-e2e #31 .
Required assertions
The test should explicitly assert all of the following:
OpenCode/runtime assertions
the test runs through OpenCode, not a direct core-only path
the orfe custom tool loads successfully
orfe-e2e-operator is the caller name used at runtime
the configured caller-name → GitHub App identity mapping is exercised successfully
CLI / tool output assertions
orfe pr get exits successfully
orfe pr comment exits successfully
all exercised commands emit valid structured JSON
read output includes the expected PR number and URL
comment output includes the expected comment identifier and URL where the command contract exposes them
GitHub artifact assertions
the target PR exists in the orfe-e2e repository
the created comment exists on that PR
the comment body matches the expected deterministic content including the run id
the comment is attached to the intended PR and not a different artifact
Actor identity assertions
the visible GitHub actor for the PR comment is 0RF3-0P3R470R-BOT where GitHub exposes it
the story should fail if the artifact appears to have been created by the wrong bot identity
Isolation assertions
the PR fixture and created comment are uniquely identifiable by run id
the run does not require prior manual cleanup to pass
the chosen fixture strategy is documented precisely enough that repeated runs remain deterministic
Output / evidence requirements
The test should record enough evidence to debug failures, including:
run id
synthetic caller name used for the run
mapped GitHub App identity
PR number
PR URL
comment URL
final observed comment body
observed actor identity fields used for validation
Cleanup / isolation
Follow the policy defined in #31 .
If the chosen policy is retention instead of deletion:
the retained comment must remain clearly attributable to the test run id
the retained PR fixture must remain distinguishable from human-created orfe-e2e activity
the policy must document whether comment retention is intentional evidence or whether PR fixtures are rotated/reset outside the test
Acceptance criteria
Non-goals
PR creation behavior beyond the fixture setup needed for this story
workflow comment validation
project status validation
PR review submission or reply behavior
testing production persona definitions
testing broader multi-agent orchestration behavior
Context
Issue #31 defines the live e2e contract for
orfeinorfe-e2e.This story should validate a real OpenCode-integrated pull request comment path for
orfe-e2ePR collaboration:context.agentis availableorfeorfe-e2erepo config maps that caller name to the correct GitHub App identityorfeposts a real comment on aorfe-e2epull request through the live GitHub APIThis story should use
orfe-e2e-operator, not a production persona.Desired outcome
Add a live e2e test that proves the following story:
Dependencies
orfeinorfe-e2e#31orfe pr get#20 (orfe pr get)orfe pr comment#28 (orfe pr comment)orfedesign/spec from Design theorfecustom tool and CLI contract #13Preconditions
The story must assume and require:
orfe-e2erepository existsorfe-e2epull request fixture exists for the run, or the test provisions one through an approved fixture path documented in the testorfe-e2eorfeconfig exists and points at theorfe-e2erepositoryorfe-e2eorfeconfig defines theorfe-e2e-operatorcaller name mapped to the0RF3-0P3R470R-BOTGitHub App identityorfe-e2e-operator0RF3-0P3R470R-BOTis installed and authorized for theorfe-e2erepositoryorfe-e2einfrastructureAgent model for this story
This story should use the
orfe-e2e-operatorsynthetic e2e agent defined only fororfe-e2euse.The test must not depend on the production
Jelenapersona definition.What matters here is:
orfe-e2e-operatorthroughcontext.agentorfe-e2econfig maps that caller name to the0RF3-0P3R470R-BOTGitHub App identityorfeexecutes under the correct dedicated e2e GitHub App identityCommands under test
The story should exercise these
orfecommands through the real OpenCode-integrated path:orfe pr getorfe pr commentThe story must run through OpenCode, not by calling the
orfecore directly.Suggested test flow
orfe-e2ePR fixture exists and is uniquely attributable to the run.orfe-e2e-operator.orfe pr getfor the fixture PR context and capture structured output.orfe pr commentwith a comment body containing the run id and deterministic content.0RF3-0P3R470R-BOTwhere GitHub exposes it.orfeinorfe-e2e#31.Required assertions
The test should explicitly assert all of the following:
OpenCode/runtime assertions
orfecustom tool loads successfullyorfe-e2e-operatoris the caller name used at runtimeCLI / tool output assertions
orfe pr getexits successfullyorfe pr commentexits successfullyGitHub artifact assertions
orfe-e2erepositoryActor identity assertions
0RF3-0P3R470R-BOTwhere GitHub exposes itIsolation assertions
Output / evidence requirements
The test should record enough evidence to debug failures, including:
Cleanup / isolation
Follow the policy defined in #31.
If the chosen policy is retention instead of deletion:
orfe-e2eactivityAcceptance criteria
orfe-e2e-operatorPR comment storyorfe-e2e-operator, not a production personacontext.agentorfe-e2e-operatororfe pr getorfe pr commentorfe-e2erepository0RF3-0P3R470R-BOTactor identity where relevantorfe-e2eisolation policy from Define the live e2e test contract fororfeinorfe-e2e#31Non-goals