spec(59): rebase fork onto upstream/main + reapply fork features (squeeze cascade, secondary fallback, telemetry, favorites) - #60
Merged
Conversation
Rebase the fork onto current upstream/main (f9ca333) and reapply the complete fork feature set as a clean patch on top: - Squeeze cascade: resolveSqueezeModelAliasWithCascade (primary -> secondary -> current model fallback) in fullCompactionService.begin() - Secondary model fallback in compactionRound retry loop - Fork telemetry events: compaction_threshold_override, compaction_token_budget_override, substitute_model_activated, substitute_model_deactivated (+ model/model_display fields) - Model favorites (favoriteModels) in TUI config + /squeeze-model, /fallback-model, /fork-session slash commands - fallbackModel config schema (packages/agent-core + tui) - Substitute-model on rate limit (llmRequesterService + session flag) - Compaction instruction template + compactionModelOverlay - Fork-owned deps (http-proxy-agent), no-comment rule script, session-list subcommand, FORK_OWNED_FILES guard, sync workflows, spec-kit extension tooling Upstream features now present linearly (previously entangled in merge resolutions): wire journal tracking (fullCompactionWireRangesKey, IWireService, captureWireLines, renderRecoveryFooter), budget() + CompactionBudget, context budget + ahead reminder telemetry, renderCompactionInstruction, historyForModel.length === 0 guard. Tree-identical to previous fork master (git diff master HEAD is empty) but now based linearly on upstream/main. Spec #59 Phase 3.
…nto isolated modules Move the fork-owned squeeze-model cascade logic, SqueezeModelDecided event, and fork telemetry events (compaction_threshold_override, compaction_token_budget_override, substitute_model_activated, substitute_model_deactivated) out of upstream-touched files into dedicated fork modules: - squeezeForkOps.ts: SqueezeModelDecided Event2 + squeezeModelKey state - squeezeCascade.ts: resolveSqueezeModelAliasWithCascade standalone function - forkEvents.ts: fork telemetry event definitions + forkTrack2 helper fullCompactionService.ts: begin() now dispatches SqueezeModelDecided after FullCompactionBegin using the extracted cascade function. The inline resolveSqueezeModelAliasWithCascade private method is removed. profileService.ts: fork telemetry calls use forkTrack2() wrapper. FORK_OWNED_FILES: register new modules with survival markers.
The 2026-09-05 sync resolution of test/tui/config.test.ts kept upstream's [editor] command TOML input but dropped upstream's editorCommand: 'code --wait' expectation from the assertion object, leaving 'parses valid TOML' failing. Reconcile the fork fixture (favoriteModels) with the upstream fixture (editorCommand) so both survive in one assertion. Part of spec #59 Phase 3 (test fixtures reapplication).
…e/wire registries The cherry-picked squeeze-module refactor predates upstream's strict state/wire registries; integrate it with them: - fullCompactionService: contributeState(squeezeModelKey) so the replayable squeeze state is owned by the compaction service (the generator requires every replayable key to be contributed) - test/index.test.ts: register 'squeeze_model.decided' in V2_RECORD_TYPES (upstream v1 wire vocabulary guard) - test/state/builtinReplayableKeys.ts: register squeezeModelKey so the harness replayable-state drift check passes - regenerate docs/state-manifest.d.ts and docs/wire-manifest.d.ts: adds squeeze_model.decided + FullCompactionBegin model/modelDisplay wire shapes; also brings the manifests up to date with the current generator (fixes pre-existing stale-manifest test failures) Spec #59 Phase 3 (fullCompactionService cascade integration).
agent-core-v2 now persists a 'squeeze_model.decided' durable record (from the squeeze-fork-modules refactor). Register it in the vis server's AgentRecord union and add a wire renderer so vis-web's 'covers every durable record' guard stays green. Spec #59 Phase 3.
The rebased branch carries the complete fork content (tree-identical to master before the isolated-module commits), so legacy master contributes no new content; conflicting hunks resolve to the rebased versions. This makes the PR mergeable while keeping the rebased content intact. Spec #59 Phase 3.
…y fork no-comment rule The 2026-09-05 sync merged upstream test files (bash timeout tests) containing comments, which violate the fork-owned no-comment rule (scripts/check-no-comments.mjs) and were failing CI lint on master. Remove the 9 violating comment lines; no behavior change. Spec #59 Phase 4 (validate).
…e switch The projector's record switch is exhaustiveness-checked; the new squeeze_model.decided record (carried through with no history-side projection) needs an explicit no-op case. Spec #59 Phase 3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spec #59: Fork based on older upstream version → 5 recurring merge conflicts. Strategy: rebase fork onto current upstream/main, then reapply fork features on top.
Fork features: squeeze cascade, secondary model fallback, fork telemetry events, model favorites, TUI slash commands.
Upstream features gained: wire journal tracking, budget & ahead reminders, compaction instruction helper.
Phase 1: Prepare fork feature patches (FORK_OWNED_FILES)
Phase 2: Reset master to upstream/main
Phase 3: Reapply fork features
Phase 4: Validate — tests pass, next sync clean
Closes #59