Skip to content

feat: cache SSH output between discovery and reasoning phases (#2899)#2942

Merged
rysweet merged 2 commits intomainfrom
fix/2899-cache-ssh-output
Mar 8, 2026
Merged

feat: cache SSH output between discovery and reasoning phases (#2899)#2942
rysweet merged 2 commits intomainfrom
fix/2899-cache-ssh-output

Conversation

@rysweet
Copy link
Owner

@rysweet rysweet commented Mar 7, 2026

Summary

  • Adds TTL-based SSH output cache to SessionManager
  • Repeated capture_output() calls within TTL window reuse cached results
  • Reduces SSH overhead during discovery→reasoning transition
  • Cache keys include VM name and command to prevent cross-session contamination

Fixes #2899

Test plan

  • Run uv run pytest tests/outside_in/test_cache_ssh_output.py -v (12/12 pass)
  • Verify cache hit/miss behavior with TTL expiry
  • CI passes

Quality audit results

  • Import path fixed (amplifier_bundle → sys.path-based import)
  • Test assertion fixed for cross-session cache independence
  • No stubs, no dead code, proper error handling for nonexistent sessions

🤖 Generated with Claude Code

@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

🤖 Auto-fixed version bump

The version in pyproject.toml has been automatically bumped to the next patch version.

If you need a minor or major version bump instead, please update pyproject.toml manually and push the change.

@github-actions github-actions bot mentioned this pull request Mar 7, 2026
@rysweet rysweet force-pushed the fix/2899-cache-ssh-output branch from 1dbb100 to 699bc30 Compare March 8, 2026 01:30
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

🤖 Auto-fixed version bump

The version in pyproject.toml has been automatically bumped to the next patch version.

If you need a minor or major version bump instead, please update pyproject.toml manually and push the change.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

Repo Guardian - Passed

All changed files have been reviewed:

  • session.py (3 copies): Production code implementing SSH output caching with proper documentation
  • test_cache_ssh_output.py: Comprehensive test suite following pytest conventions
  • pyproject.toml: Standard version bump

All files are durable components suitable for the repository. No ephemeral content detected.

AI generated by Repo Guardian

Ubuntu and others added 2 commits March 8, 2026 01:48
Add TTL-based SSH output cache to SessionManager so repeated
capture_output() calls within the TTL window reuse cached results
instead of re-running SSH commands. Reduces SSH overhead during
the discovery→reasoning transition.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rysweet rysweet force-pushed the fix/2899-cache-ssh-output branch from 3e77dbe to a7fbe12 Compare March 8, 2026 01:48
@rysweet rysweet merged commit bddc3cc into main Mar 8, 2026
13 of 14 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

🤖 Auto-fixed version bump

The version in pyproject.toml has been automatically bumped to the next patch version.

If you need a minor or major version bump instead, please update pyproject.toml manually and push the change.

rysweet added a commit that referenced this pull request Mar 8, 2026
…#2942)

* feat: cache SSH output between discovery and reasoning phases (#2899)

Add TTL-based SSH output cache to SessionManager so repeated
capture_output() calls within the TTL window reuse cached results
instead of re-running SSH commands. Reduces SSH overhead during
the discovery→reasoning transition.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* ci: trigger full CI pipeline

---------

Co-authored-by: Ubuntu <azureuser@deva.ftnmxvem3frujn3lepas045p5c.xx.internal.cloudapp.net>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cache SSH output between discovery and reasoning

1 participant