Skip to content

chore: remove unused files and directories - #6

Merged
macayaven merged 5 commits into
mainfrom
cleanup/remove-unused-files
Jan 9, 2026
Merged

macayaven merged 5 commits into
mainfrom
cleanup/remove-unused-files

Conversation

@macayaven

Copy link
Copy Markdown
Owner

Summary

Clean up files not needed for the HuggingFace demo deployment:

Removed:

  • src/observability/ - Langfuse metrics (optional, not used in demo)
  • src/state/ - checkpoint/versioning (not used in demo)
  • Dockerfile, Dockerfile.dev - self-hosting configs
  • docker-compose.yml, docker-compose.dev.yml - local deployment
  • DEMO_GUIDE.md - outdated documentation
  • demo/killer_demo.py - standalone demo script
  • experiments/gordon/interactive_test.py - Gordon testing

Kept:

  • Core neural memory implementation (src/memory/, src/config.py)
  • HuggingFace deployment (deploy/huggingface/)
  • MCP server (src/mcp_server/)
  • Tests and documentation

Why

Simplify the repository to focus on the live demo. These files were for local Docker deployment which is not the current focus.

🤖 Generated with Claude Code

Remove files not needed for the HuggingFace demo deployment:

- src/observability/ - Langfuse metrics (optional, not used in demo)
- src/state/ - checkpoint/versioning (not used in demo)
- Dockerfile, Dockerfile.dev - self-hosting (demo runs on HF)
- docker-compose.yml, docker-compose.dev.yml - local deployment
- DEMO_GUIDE.md - outdated documentation
- demo/killer_demo.py - standalone demo script
- experiments/gordon/interactive_test.py - Gordon testing

The core neural memory implementation and HuggingFace app remain intact.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 9, 2026 14:46
codescene-delta-analysis[bot]

This comment was marked as outdated.

Remove test files that imported deleted observability and state modules:
- tests/unit/test_observability.py
- tests/test_persistence.py

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
codescene-delta-analysis[bot]

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to simplify the repository by removing files related to local Docker deployment, observability, state management, experimental code, and demo scripts to focus on the HuggingFace deployment and core neural memory implementation.

Key intended changes:

  • Remove Docker deployment infrastructure (Dockerfile, Dockerfile.dev, docker-compose files)
  • Remove observability module (Langfuse metrics tracking)
  • Remove state management module (checkpoints and versioning)
  • Remove demo and experiment files

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/state/checkpoint.py Removes checkpoint management functionality
src/state/versioning.py Removes version/fork management functionality
src/state/init.py Removes state module initialization
src/observability/metrics.py Removes Langfuse observability integration
src/observability/init.py Removes observability module initialization
experiments/gordon/interactive_test.py Removes Gordon testing script
docker-compose.yml Removes production Docker Compose config
docker-compose.dev.yml Removes development Docker Compose config
demo/killer_demo.py Removes standalone demo script
Dockerfile.dev Removes development Docker image config
Dockerfile Removes production Docker image config
DEMO_GUIDE.md Removes demo documentation
Comments suppressed due to low confidence (5)

src/state/checkpoint.py:1

  • This module is still actively used by src/mcp_server/server.py (lines 17, 42) and tests/test_persistence.py. Deleting it will break the MCP server initialization and all checkpoint-related tests. The MCP server is listed as a component to keep in the PR description.
    src/state/versioning.py:1
  • This module is still actively used by src/mcp_server/server.py (lines 18, 43) and tests/test_persistence.py. Deleting it will break the MCP server initialization and version management functionality. The MCP server is listed as a component to keep in the PR description.
    src/observability/metrics.py:1
  • This module is still being tested by tests/unit/test_observability.py which imports MemoryObserver and MetricsSnapshot. Deleting this module will break the test suite.
    Dockerfile:1
  • The CI workflow (.github/workflows/ci.yml lines 93-100) builds a Docker image from the root context, which requires a Dockerfile in the root directory. Deleting this file will break the "Build Docker" job in the CI pipeline. Either update the CI workflow to use the deploy/huggingface/Dockerfile or keep this file.
    Dockerfile.dev:1
  • The previous development Dockerfile downloaded and executed https://astral.sh/uv/install.sh via curl | sh without any integrity verification, which is a supply-chain risk if the remote script or its delivery is compromised. An attacker who can tamper with that script could execute arbitrary code in the build environment and potentially access secrets or poison the resulting image. Removing this pattern (or alternatively pinning to a specific version and verifying checksums or signatures) eliminates this supply-chain risk.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Stub out checkpoint, restore, fork, and list_checkpoints handlers
since state module was removed. Core observe/infer/surprise functionality
remains intact.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
codescene-delta-analysis[bot]

This comment was marked as outdated.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 9, 2026 15:01
Deploy now depends directly on lint, typecheck, test passing.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
codescene-delta-analysis[bot]

This comment was marked as outdated.

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gates Passed
4 Quality Gates Passed

See analysis details in CodeScene

Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

@macayaven
macayaven merged commit 9cda0c8 into main Jan 9, 2026
5 checks passed
@macayaven
macayaven deleted the cleanup/remove-unused-files branch January 9, 2026 15:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

Dockerfile.dev:1

  • Previously, Dockerfile.dev installed uv by piping curl output from https://astral.sh/uv/install.sh directly into sh without any integrity verification. If an attacker compromised DNS, the astral.sh host, or the network, they could execute arbitrary code in the build environment and inject backdoors into built images or downstream artifacts. This PR removes that curl ... | sh pattern; future installers should use a pinned artifact with checksum/signature verification or an official package source instead of executing remote scripts directly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/mcp_server/server.py
"tag": info.tag,
"size_mb": info.size_mb,
"weight_hash": info.weight_hash,
"error": "Checkpoint functionality not available in this version",

Copilot AI Jan 9, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message uses "this version" but could be more specific. Consider changing to "Checkpoint functionality has been removed in the demo version" to be clearer about why the feature is unavailable. This helps users understand this is an intentional removal, not a temporary unavailability.

Suggested change
"error": "Checkpoint functionality not available in this version",
"error": "Checkpoint functionality has been removed in the demo version",

Copilot uses AI. Check for mistakes.
Comment thread src/mcp_server/server.py
"restored": True,
"weight_hash": info.weight_hash,
"learning_since_checkpoint": learning.get("total_learning", 0),
"error": "Restore functionality not available in this version",

Copilot AI Jan 9, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message uses "this version" but could be more specific. Consider changing to "Restore functionality has been removed in the demo version" to be clearer about why the feature is unavailable.

Suggested change
"error": "Restore functionality not available in this version",
"error": "Restore functionality has been removed in the demo version",

Copilot uses AI. Check for mistakes.
Comment thread src/mcp_server/server.py
"forked": info.forked,
"source_hash": info.source_hash,
"new_hash": info.new_hash,
"error": "Fork functionality not available in this version",

Copilot AI Jan 9, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message uses "this version" but could be more specific. Consider changing to "Fork functionality has been removed in the demo version" to be clearer about why the feature is unavailable.

Suggested change
"error": "Fork functionality not available in this version",
"error": "Fork functionality has been removed in the demo version",

Copilot uses AI. Check for mistakes.
Comment thread src/mcp_server/server.py
]
}
# List checkpoints functionality removed - not needed for demo
return {"checkpoints": []}

Copilot AI Jan 9, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checkpoint, restore, fork, and list_checkpoints tool handlers now return error messages indicating functionality is not available. However, the tool schemas in src/mcp_server/tools.py still advertise these tools as available. Consider either:

  1. Removing the checkpoint/restore/fork/list_checkpoints tool schemas from TOOL_SCHEMAS in tools.py, or
  2. Adding a comment in tools.py explaining that these tools are defined but not functional in the demo version.

This prevents MCP clients from seeing tools that will always return errors.

Suggested change
return {"checkpoints": []}
return {
"error": "List checkpoints functionality not available in this version",
"checkpoints": [],
}

Copilot uses AI. Check for mistakes.
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.

2 participants