Skip to content

Implement e2e story: orfe-e2e-author creates and updates an issue through orfe #32

Description

@z0r4n-bot

Context

Issue #31 defines the live e2e contract for orfe in orfe-e2e.

This story should validate the simplest real OpenCode-integrated path for orfe:

  • the OpenCode custom tool loads
  • context.agent is available
  • the wrapper passes caller identity into orfe
  • repo config maps that caller name to the correct GitHub App identity
  • orfe performs real GitHub issue create/update operations in the orfe-e2e repository

This story should use orfe-e2e-author, not a production persona.

Desired outcome

Add a live e2e test that proves the following story:

As orfe-e2e-author, I can invoke orfe through OpenCode to create a new issue in the orfe-e2e repository and then update that same issue, and the resulting GitHub artifact reflects the expected final state and GitHub actor identity.

Dependencies

Preconditions

The story must assume and require:

  • a dedicated orfe-e2e repository exists
  • orfe-e2e orfe config exists and points at that repository
  • orfe-e2e orfe config defines the orfe-e2e-author caller name mapped to the 0RF3-4U7H0R-BOT GitHub App identity
  • a low-cost or free OpenCode model is configured for orfe-e2e-author
  • 0RF3-4U7H0R-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

Agent model for this story

This story should use the orfe-e2e-author synthetic e2e agent defined only for orfe-e2e use.

The test must not depend on the production Zoran persona definition.

What matters here is:

  • OpenCode passes orfe-e2e-author through context.agent
  • orfe-e2e config maps that caller name to the 0RF3-4U7H0R-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:

  1. orfe issue create
  2. orfe issue update

The story must run through OpenCode, not by calling the orfe core directly.

Suggested test flow

  1. Generate a unique run id for the test.
  2. Invoke OpenCode with orfe-e2e-author.
  3. Through that agent, call orfe issue create with a title/body containing the run id.
  4. Capture the structured output from the command.
  5. Through the same agent, call orfe issue update on the created issue with updated title/body content.
  6. Capture the structured output from the update command.
  7. Verify the resulting issue on GitHub matches the expected final state.
  8. Verify the visible GitHub actor identity is 0RF3-4U7H0R-BOT.
  9. 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-author is the caller name used at runtime
  • the configured caller-name → GitHub App identity mapping is exercised successfully

CLI / tool output assertions

  • orfe issue create exits successfully
  • orfe issue update exits successfully
  • both commands emit valid structured JSON
  • returned JSON includes the expected issue_number and url

GitHub artifact assertions

  • the created issue exists in the orfe-e2e repository
  • the created issue title matches the expected initial title
  • the created issue body matches the expected initial body
  • after update, the issue title/body matches the expected updated value(s)
  • the updated issue is still the same issue number created earlier

Actor identity assertions

  • the visible GitHub actor for the issue mutations is 0RF3-4U7H0R-BOT where GitHub exposes it
  • the story should fail if the artifact appears to have been created or updated by the wrong bot identity

Isolation assertions

  • the test-created issue is uniquely identifiable by run id
  • the run does not require prior manual cleanup to pass

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
  • issue number
  • created URL
  • updated URL
  • final observed issue title/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 issue must:

  • remain clearly tagged by run id
  • be distinguishable from human-created orfe-e2e artifacts

Acceptance criteria

  • a live e2e test exists for the orfe-e2e-author create/update story
  • the test runs through the OpenCode-integrated path
  • the test uses orfe-e2e-author, not a production persona
  • the test proves caller-name resolution through context.agent
  • the test proves caller-name → GitHub App identity mapping for orfe-e2e-author
  • the test invokes orfe issue create
  • the test invokes orfe issue update
  • the test validates structured output for both commands
  • the test validates the final GitHub issue state in the orfe-e2e repository
  • the test validates visible 0RF3-4U7H0R-BOT actor identity where relevant
  • the test follows the orfe-e2e isolation policy from Define the live e2e test contract for orfe in orfe-e2e #31
  • the test is opt-in and not part of the default fast test path

Non-goals

  • project status validation
  • workflow comment validation
  • PR creation or review behavior
  • testing production persona definitions
  • testing broader multi-agent orchestration behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions