Repository navigation
feat: support opt-in automatic compact adviser across fleet launches - #34
Merged
Merged
Conversation
…raw hook ownership
…l expansion lint diagnostics
…idate policy ownership
MrGTV-love
force-pushed
the
fm/fm-compact-adviser-fleet
branch
from
October 7, 2026 02:01
22e8f9d to
178bb24
Compare
…lm’s incidental directory-content allowlist, which rejected validator-generated tsconfig.json; retained semantic manifest/hooks checks and real-engine validation. ci-2: gave the Herdr fixture an independent sibling code root and migrated all shared spawn/teardown helpers, preserving production secondmate containment checks. Confined lab-helper records to the sandbox and restored write permission before cleanup so read-only Git-hook directories can be removed. Updated test comments. Verification passed: scoped configured ShellCheck 0.11.0; Claude 2.1.292 strict validation at both plugin paths and its Calm plugin suites; isolated allocator/trust regression; real-Herdr boundary smoke covering alpha launch, policy inheritance, primary and both secondmate child launches, and selective teardown. All disposable sessions and verification scaffolds were removed; the default-session tripwire remained unchanged. Verification limits: the portable Calm script could not complete because PATH provides Bash 3.2, while its existing ${var@Q} syntax requires newer Bash. The full Herdr test on local 0.9.3 passed initial layout/focus/contention cases, then stopped at a separate workspace-ordering assertion before alpha; the supplied CI run used 0.7.4. Full-suite success is not claimed. No pipeline control, push, or other phase was invoked
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.
Intent
we installed this, but I do not have the perception that it is being utilized by firstmate, secondmates, crewmates or any other agent running in the vernant repo. https://github.com/kunchenguid/compact-adviser \ this would be helpful wouldn't it? Also, what is the status of our Jev workstream? compact-adviser also uses Jev. Jev is a massive potential value unlock both for the agentic build processes and the Vernant runtime.
on jev -- when I say use Jev often, it should be used for compaction (hopefully compaction-adviser is now in use), should be used to pick skills, I really like how this developer is using Jev: https://github.com/disler/ten-levels-of-jev (Level 7: Should I Compact - four questions after every turn, four tiers back: turn end hook, on demand tool, pick the cut point)
Jev should already be used for compaction -- we did implement https://github.com/kunchenguid/compact-adviser
please verify it is though
Utilizing Jev often is important. It will improve quality, accuracy, speed, while also reducing costs substantially.
Verified 2026-09-30 by firstmate: compact-adviser 0.1.5 is installed for Claude Code (enabled plugin) and omp (~/.omp/plugins, saved TypeSafe key, mode hint), but it runs in no fleet agent: every sampled Claude lane and omp worker process has COMPACT_ADVISER_DISABLE=1 (bin/fm-spawn.sh exports it unconditionally since upstream kunchenguid#4877, 2026-09-18, because hint mode has no reader in unattended sessions), and no Claude agent has CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1, which the Claude plugin needs to load.
I see. So if we use it as intended (not hint mode, but its autonomous mode), then it will be unblocked?
set this properly please
it is in the .env file in Vernant (TYPESAFE)
I am concerned that prior evaluations of jev were not constructed properly (other models), so I would instruct the workstreams not to anchor on them
the Jev workstream is also important ... if we implement Jev, it could really helpful to our current work (improve speed, quality and reduce costs)
What Changed
off/autopolicies for Claude and omp, inherited by secondmates and applied across fresh, replacement, batch, remote, and filtered launches; add an emergency disable override while preserving default-off behavior.Risk Assessment
✅ Low: The source changes are bounded and default-off, preserve explicit opt-ins and launch-scoped emergency controls, and introduce no substantiated correctness, privacy, or unnecessary-component findings.
Testing
Consolidated the same active run’s targeted regression checks and real launch, recovery, isolation, teardown, and dual-harness compaction evidence. Claude automatically compacted 45,222 to 3,899 tokens and preserved the checkpoint; OMP recorded a qualifying Jev score of 0.97 and native compaction with substantially reduced context. Initial fixture and startup-input problems were corrected before successful observations. Actual terminal captures are retained as rendered HTML, with a Calm terminal-grid replay PNG rather than an OS-window screenshot. This turn verified launcher readiness and cleanup without rerunning passing scenarios, broad suites, or other pipeline phases. Remote-host validation remains expressly excepted; no quality, speed, recall, or aggregate-cost improvement is claimed.
Evidence: Consolidated proof, limitations, and cleanup receipts
Source: Consolidated proof, limitations, and cleanup receipts
Evidence: Claude real-home launch and native compaction report
Source: Claude real-home launch and native compaction report
Evidence: Claude automatic-compaction receipt
Source: Claude automatic-compaction receipt
Evidence: Claude post-compaction checkpoint and adviser status
Source: Claude post-compaction checkpoint and adviser status
Evidence: OMP native compaction and before/after context report
Source: OMP native compaction and before/after context report
Evidence: Real OMP Jev decisions
Source: Real OMP Jev decisions
Evidence: OMP post-compaction surface
Source: OMP post-compaction surface
Evidence: Same-endpoint filtered and unfiltered policy transitions
Source: Same-endpoint filtered and unfiltered policy transitions
Evidence: Local secondmate inherited policy and real child state
Source: Local secondmate inherited policy and real child state
Pipeline
Updates from git push no-mistakes
... (30 earlier update rounds omitted to keep the PR body within GitHub's 65536-char limit; full history is in the run log.)
🔧 **Test** - 3 issues found → auto-fixed (2) → no changes applied (6) ✅
Earlier in this same run:bash tests/fm-spawn-compact-adviser-disable.test.sh; the nested secondmate fixture initially hit the repository isolation guard, then passed using an isolated sibling package containing the tracked source bytes. Provenance:targeted-commands.json.Earlier in this same run:bash tests/fm-spawn-compact-adviser-disable-remote.test.sh,bash tests/fm-backend-herdr-presentation-e2e.test.sh --sandbox-only,bash tests/fm-composer-lib.test.sh, and selected teardown regressions. Remote and sandbox fixtures are not live fleet proof.Earlier live checks: guarded named Herdr lab provision, real Claude/OMP/Codex launches,bin/fm-control.shpolicy relaunches with allowlisting absent/enabled, explicit raw-command hook opt-in, native/calm, invalid-policy refusals, emergency scout/ship batches and local secondmate child launch. Exact commands:current-manual-command-index.jsonandround2-testing-command-index.json.Earlier live server-boundary checks: fresh emergency launch followed by configured-auto launch on isolated Herdr, tmux and Zellij servers; inspected real worker environments and retained cleanup receipts.Earlier teardown checks: real task teardown preserved an exact separately grouped foreign fixture worker; targeted SIGTERM/SIGKILL checks verified exact-worker cleanup and bounded fixture lifetime.Earlier scoped authentication attempts: exact merged adapter 8392f4a installed in the OMP lab with the authorized regular mode-0600 settings copy; nativeomp login openai-codexreached account authentication. Both isolated Claude authentication routes and the real Claude TUI required login. Exact commands:main031-retry-command-index.json.This turn: read-only change/provenance inspection and reconciliation of existing product artifacts and cleanup receipts; savedfinal-test-evidence-disposition.json. No passing-subject reruns, OAuth retries, lint, static analysis, broad suites, lifecycle actions or source changes.🔧 No changes applied.
2 warnings still open:
omp login openai-codexrequired account-owner authentic…Rancommand -v omp claude tmux bun node npmto confirm native tools are available.Ranomp --help,omp login --help,claude --help, andclaude auth --helpto assess supported authentication and isolation routes.Checked presence only—not values—of supported provider credential environment variables; none of the checked variables was populated.Reviewed prior native authentication attempts and cleanup receipts inmain031-retry-command-index.json,main031-retry-omp-prerequisite.json, andmain031-retry-claude-auth-routing.json; did not retry failed OAuth.Reviewed retained baseline command indexes:targeted-commands.jsonandcurrent-manual-command-index.json. These document earlier targeted launch/transport regressions and product lifecycle checks; none was rerun in this scoped turn.Inspected the actual adviser configuration and storage interfaces to assess lab-only settings routes; did not execute mock model/Jev fixtures.Savedcurrent-jev-compaction-auth-prerequisite.jsonwith nonsecret prerequisite observations, cleanup accounting, and the remote-host exception.🔧 No changes applied.
2 warnings still open:
git diff --stat 03eaea6aeaec83c34e345c7c7160f3cc2797a2e3 f0dd557368517f358d087951583cd16a4df34db6and read-only inspection of the adviser configuration, lab-home contract and TeamClaude launcher.git show fm/fm-compaction-bakeoff:experiments/compaction-bakeoff/run.py, the corresponding README retrieval, andgit for-each-ref --format='%(refname)' '*compaction-bakeoff*'.Raw GitHub retrieval of the approved bake-off files and authenticatedgh api 'repos/MrGTV-love/firstmate/contents/experiments/compaction-bakeoff/run.py?ref=fm%2Ffm-compaction-bakeoff' -H 'Accept: application/vnd.github.raw+json'.omp --versionwith disposable lab HOME and XDG_CONFIG_HOME returnedomp/18.6.3; provider-key variable presence was checked without printing values.Workspace-local npm installation attempts:teamclaude@0.2.7was identified as an unrelated sprint tool; the actual proxy package@karpeleslab/teamclaudewas then installed and reported version1.1.24.bin/fm-lab-home.sh create <lab>andtmux-dir <lab>; launched the realbin/fm-teamclaude-launch.shon the privatefm-labsocket with isolated HOME/configuration and a 120x40 grid, then captured its refusal.Provisioned a disposable TeamClaude configuration on a random loopback port, ran the realteamclaude server --headless, captured itsNo accounts configuredrefusal, ran isolatedteamclaude status, and re-attempted the real Claude wrapper.Killed only the privatefm-labtmux server, successfully ranbin/fm-lab-home.sh teardown <lab>, and removed the disposable lab and both local npm installations.🔧 No changes applied.
2 warnings still open:
teamclaude env --mitm. Per the recorded decision, validation stopped at that screen without OAuth retries or operator credential-store access. Provide a supported lab-owned Claude authentication route before Claude Jev judgment and native automatic compaction can be demonstrated.Read the supplied bake-off isolated-auth reference and resolved Codex authentication throughomp token openai-codex, retaining the token only in process memory/environment.Created disposable marked homes withbin/fm-lab-home.sh create; launched actual harnesses on privateTMUX_TMPDIR=<lab>/tmux tmux -L fm-labsockets with 140×40 terminal grids.Ran realomp --no-extensions -e <observer> -e ~/.omp/plugins/node_modules/compact-adviser/src/index.ts --config <isolated-overlay> --model openai-codex/gpt-6.1-sol --thinking lowagainst synthetic tool-result context.Observed the initial retention safety refusal, corrected the disposablekeepRecentTokenssetting from 1000 to 20000, and reran a fresh OMP session with native idle compaction disabled.Captured a real qualifying Jev response, native compaction events, before/after context, and a successful post-compactionCHECKPOINT_CONFIRMEDcontinuation.Resolved the approved hostteamclaude env --mitmexport without printing its values; launchedbin/fm-teamclaude-launch.sh --exec env HOME=<lab> CLAUDE_CONFIG_DIR=<lab-config> claude --plugin-dir <disposable-real-plugin>and drove onboarding to the login-method screen.Confirmed the launcher's hostteamclaude envoutput matched the explicit--mitmexport.Captured rendered terminal HTML and product event/decision artifacts, stopped both private tmux servers, and removed disposable homes, dependencies, and worktree scaffolding. No broad suites, linters, or static analysis were run.🔧 No changes applied.
✅ Re-checked - no issues remain.
Earlier in this run:bash tests/fm-spawn-compact-adviser-disable.test.sh; initial nested-staging refusal was resolved by running identical tracked bytes in a confined sibling source package.Earlier in this run:bash tests/fm-spawn-compact-adviser-disable-remote.test.sh,bash tests/fm-backend-herdr-presentation-e2e.test.sh --sandbox-only, selected teardown regressions, andbash tests/fm-composer-lib.test.sh.Realbin/fm-spawn.shandbin/fm-control.shlaunches exercised default-off, invalid-policy refusal, filtered/unfiltered same-endpoint policy transitions, emergency batch dispatch, explicit Calm opt-in, and local-secondmate inheritance.Real isolated Herdr, tmux, and Zellij launches exercised fresh-server emergency-switch isolation; native task teardown exercised foreign-worker preservation.Real OMP synthetic settled turn produced a qualifying Jev response, native remote compaction, and a post-compaction continuation; commands and receipts are retained in the live-proof artifacts.Real Claude 2.1.292 launched throughbin/fm-teamclaude-launch.shwith the authorized existing login in a guarded Herdr lab. A launch-only threshold overlay preceded synthetic archive reads, automatic compaction, and a checkpoint-confirmation turn.This turn:bin/fm-teamclaude-launch.sh --checkexited 0.This turn:bin/fm-herdr-lab.sh run fm-lab-claude-live-proo-10589-29006 session list --jsonconfirmed the proof lab was absent; read-only inspection confirmed its plugin-owned compacted session state and an empty worktree test-temp directory.✅ **Document** - passed
✅ No issues found.
✅ No issues found.
🔧 **Lint** - 1 issue found → auto-fixed ✅
🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ No issues found.
✅ **Push** - passed
✅ No issues found.
✅ No issues found.