Skip to content

RFC: retire the unreachable active-full-compact path #3091

Closed

Description

@Astro-Han

Problem

active-full-compact in packages/runtime is unreachable in production:

  • the only production policy builder (context-budget-policy.ts) never sets activeFullCompact, so the gate at ai-sdk-compaction.ts:1220 is evaluated every turn and always returns undefined;
  • there is no env var or config anywhere that enables it — unlike its sibling semantic-compact, which is explicitly env-gated at context-budget-policy.ts:278-289;
  • the whole direct path (~2000 lines: active-full-compact.ts dead subset + active-full-compact-facts.ts + record seams + active_full_compact_block_recorded event type + a 1134-line test) is maintained by tests alone.

The shared source-index / safe-span / coverage kernel is used by semantic-compact and must be kept regardless.

This is a decision issue, not a removal commitment: the question is whether active-full-compact is a deliberately dormant experiment (to be enabled later) or was superseded by semantic compaction (which reuses its kernel).

Desired outcome

A recorded decision with the decisive evidence. If retired: remove the unreachable path while preserving the shared kernel. If kept: give it an explicit env gate, owner, and rollout intent so it is a real capability.

Decision evidence to gather

  • Whether any issue/roadmap item or benchmark result references enabling activeFullCompact
  • Whether semantic compaction's reuse of the source-index/safe-span kernel means the useful part is already lifted into its successor
  • Whether the validate_only / prepare_step_dry_run modes have any production consumer

Acceptance (if retired)

  • active-full-compact dead path + active-full-compact-facts.ts + record seams + event type + test removed
  • selectActiveCompactionSafeSpan, buildActiveCompactionHeadAnchor, and everything semantic-compact.ts imports retained
  • Focused runtime tests, typecheck, and Biome pass

Related

  • semantic-compact.ts (the env-gated successor reusing the shared kernel)

Activity

  1. added
    enhancement
    on Aug 15, 2026
  2. ARE404 commented on Aug 16, 2026

    @ARE404
    Contributor

    I'd like to take this. I'll first verify the decision evidence: no roadmap/benchmark or production consumer still plans to enable active-full-compact, and the useful shared source-index/safe-span kernel is already retained by semantic compaction. If that evidence supports retirement, I'll submit a focused draft PR that removes only the unreachable path, its private record/event seams, and dedicated tests while preserving every semantic-compact dependency. I'll run the focused runtime suite, typecheck, and Biome. Codex is assisting with the investigation and implementation; I will review the resulting diff and remain responsible for the contribution.

  3. ARE404 commented on Aug 16, 2026

    @ARE404
    Contributor

    Draft implementation is up in #3128. The decision evidence supports retirement: no current policy builder or environment gate enables activeFullCompact; semantic compact is the wired successor and sole production consumer of the shared source-index/safe-span/coverage kernel; and repository search found no roadmap, benchmark, external caller, or separate PR depending on the direct path or its dry-run modes. The PR removes the dead path and durable writer/event while extracting and testing the shared kernel.

  4. ARE404 commented on Aug 17, 2026

    @ARE404
    Contributor

    @hqhq1025 Could you or another architecture owner record the independent retirement decision for this RFC? The evidence gathered in #3128 is: no production policy/env gate or roadmap/benchmark consumer enables activeFullCompact; semantic compact is the sole wired successor and retains the shared source-index/safe-span kernel; and no production consumer uses validate_only or prepare_step_dry_run. The four P2 source-integrity and coverage findings from review are addressed in 94a7bcf, with focused tests and a full repository build passing. The PR should remain unapproved until a maintainer explicitly chooses retire versus keep-with-owner-and-rollout here. Codex assisted with the implementation and this status summary; I remain responsible for the contribution.

  5. hqhq1025 commented on Aug 17, 2026

    @hqhq1025
    Contributor

    Maintainer / architecture decision: retire activeFullCompact rather than keep a dormant second path.

    I checked current main and PR #3128 at 618a9de. No production policy builder or environment gate constructs activeFullCompact, and its direct modes have no production consumer. #327 is closed, and the useful source-index, safe-span, coverage, archive, and head-anchor work is now retained by the wired semantic compact path. The remaining open roadmap references are historical module-cleanup or general context-management references, not an owner, benchmark, or rollout plan to enable this direct path. validate_only and prepare_step_dry_run remain supported under semantic compact; they do not justify keeping the retired authority.

    Keeping active-full would preserve a second compaction authority with no activation, owner, benchmark, or rollout while duplicating its successor. Retire the direct path and its durable event/record seams; keep the projection-agnostic active compaction kernel owned by semantic compact.

    I also re-reviewed the current PR head. The four P2 findings are addressed: role-aware one-to-one RuntimeEvent binding, tool-episode cardinality, the active archive placeholder contract, and real AiSdkBackend.send semantic-compaction pipeline coverage. The latest commit also pins the structured projection format so that test cannot pass through the bounded-text fallback. A clean isolated checkout passed the full repository build, 35 focused kernel/semantic/copy tests, the real backend integration test, and Biome checks. The substantive GitHub CI jobs are green; the request-review failure is reviewer-quota automation, not a product failure.

    This records the retirement direction and removes the governance blocker. Normal final PR review and merge responsibility still apply.

    Codex assisted with evidence gathering, adversarial re-review, and verification; I reviewed the evidence and own this architecture decision.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions