Skip to content

[P2a] feat: system.transform E2E tests #105

Description

@four-bytes-robby

Purpose

Validate that experimental.chat.system.transform correctly injects layered cacheable prefixes and compaction instructions into the system prompt.

Technical Details

  • Mock ctx with minimal plugin interface
  • Create fixture: session with 4 layers (core_prefix, repo_profile, task_slice, issue_slice)
  • Assert: output.system receives layered prefix block + compaction instruction
  • Assert: disabled layers are excluded
  • Assert: empty layers produce no prefix block
  • Assert: layer order matches config order (1→2→3→4)

Files to Create

  • test/e2e/system-transform.test.ts
  • test/fixtures/mock-plugin-context.ts
  • test/fixtures/sample-layers.ts

Acceptance Criteria

  • Tests pass with bun test test/e2e/system-transform.test.ts
  • Coverage for all 3 code paths (layers present, layers empty, layers disabled)
  • No real LLM calls

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions