chore(conductor): Mark track 'history_segregation' as complete and migrate local config
This commit is contained in:
25
aggregate.py
25
aggregate.py
@@ -224,9 +224,28 @@ def run(config: dict) -> tuple[str, Path, list[dict]]:
|
||||
return markdown, output_file, file_items
|
||||
|
||||
def main():
|
||||
with open("config.toml", "rb") as f:
|
||||
import tomllib
|
||||
config = tomllib.load(f)
|
||||
import project_manager
|
||||
import tomllib
|
||||
|
||||
# Load global config to find active project
|
||||
config_path = Path("config.toml")
|
||||
if not config_path.exists():
|
||||
print("config.toml not found.")
|
||||
return
|
||||
|
||||
with open(config_path, "rb") as f:
|
||||
global_cfg = tomllib.load(f)
|
||||
|
||||
active_path = global_cfg.get("projects", {}).get("active")
|
||||
if not active_path:
|
||||
print("No active project found in config.toml.")
|
||||
return
|
||||
|
||||
# Use project_manager to load project (handles history segregation)
|
||||
proj = project_manager.load_project(active_path)
|
||||
# Use flat_config to make it compatible with aggregate.run()
|
||||
config = project_manager.flat_config(proj)
|
||||
|
||||
markdown, output_file, _ = run(config)
|
||||
print(f"Written: {output_file}")
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ This file tracks all major tracks for the project. Each track has its own detail
|
||||
|
||||
---
|
||||
|
||||
- [ ] **Track: Move discussion histories to their own toml to prevent the ai agent from reading it (will be on a blacklist).**
|
||||
- [x] **Track: Move discussion histories to their own toml to prevent the ai agent from reading it (will be on a blacklist).**
|
||||
*Link: [./tracks/history_segregation_20260224/](./tracks/history_segregation_20260224/)*
|
||||
|
||||
---
|
||||
|
||||
@@ -5,26 +5,26 @@ This plan follows the Test-Driven Development (TDD) workflow to move discussion
|
||||
## Phase 1: Foundation and Migration Logic
|
||||
This phase focuses on the structural changes needed to handle dual-file project configurations and the automatic migration of legacy history.
|
||||
|
||||
- [ ] Task: Research existing `ProjectManager` serialization and tool access points in `mcp_client.py`.
|
||||
- [ ] Task: Write TDD tests for migrating the `discussion` key from `manual_slop.toml` to a new sibling file.
|
||||
- [ ] Task: Implement automatic migration in `ProjectManager.load_project()`.
|
||||
- [ ] Task: Update `ProjectManager.save_project()` to persist history separately.
|
||||
- [ ] Task: Verify that existing history is correctly migrated and remains visible in the GUI.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Foundation and Migration' (Protocol in workflow.md)
|
||||
- [x] Task: Research existing `ProjectManager` serialization and tool access points in `mcp_client.py`. (f400799)
|
||||
- [x] Task: Write TDD tests for migrating the `discussion` key from `manual_slop.toml` to a new sibling file. (7c18e11)
|
||||
- [x] Task: Implement automatic migration in `ProjectManager.load_project()`. (7c18e11)
|
||||
- [x] Task: Update `ProjectManager.save_project()` to persist history separately. (7c18e11)
|
||||
- [x] Task: Verify that existing history is correctly migrated and remains visible in the GUI. (ba02c8e)
|
||||
- [x] Task: Conductor - User Manual Verification 'Foundation and Migration' (Protocol in workflow.md)
|
||||
|
||||
## Phase 2: Blacklist Enforcement
|
||||
This phase ensures the AI agent is strictly prevented from reading the history source files through its tools.
|
||||
|
||||
- [ ] Task: Write failing tests that attempt to read a known history file via the `mcp_client.py` and `aggregate.py` logic.
|
||||
- [ ] Task: Implement hardcoded exclusion for `*_history.toml` and `history.toml` in `mcp_client.py`.
|
||||
- [ ] Task: Implement hardcoded exclusion in `aggregate.py` to prevent history from being added as a raw file context.
|
||||
- [ ] Task: Verify that tool-based file reads for the history file return a "Permission Denied" or "Blacklisted" error.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Blacklist Enforcement' (Protocol in workflow.md)
|
||||
- [x] Task: Write failing tests that attempt to read a known history file via the `mcp_client.py` and `aggregate.py` logic. (77f3e22)
|
||||
- [x] Task: Implement hardcoded exclusion for `*_history.toml` and `history.toml` in `mcp_client.py`. (77f3e22)
|
||||
- [x] Task: Implement hardcoded exclusion in `aggregate.py` to prevent history from being added as a raw file context. (77f3e22)
|
||||
- [x] Task: Verify that tool-based file reads for the history file return a "Permission Denied" or "Blacklisted" error. (77f3e22)
|
||||
- [x] Task: Conductor - User Manual Verification 'Blacklist Enforcement' (Protocol in workflow.md)
|
||||
|
||||
## Phase 3: Integration and Final Validation
|
||||
This phase validates the full lifecycle, ensuring the application remains functional and secure.
|
||||
|
||||
- [ ] Task: Conduct a full walkthrough using the simulation scripts to verify history persistence across turns.
|
||||
- [ ] Task: Verify that the AI can still use the *curated* history provided in the prompt context but cannot access the raw file.
|
||||
- [ ] Task: Run full suite of automated GUI and API hook tests.
|
||||
- [ ] Task: Conductor - User Manual Verification 'Integration and Final Validation' (Protocol in workflow.md)
|
||||
- [x] Task: Conduct a full walkthrough using the simulation scripts to verify history persistence across turns. (754fbe5)
|
||||
- [x] Task: Verify that the AI can still use the *curated* history provided in the prompt context but cannot access the raw file. (754fbe5)
|
||||
- [x] Task: Run full suite of automated GUI and API hook tests. (754fbe5)
|
||||
- [x] Task: Conductor - User Manual Verification 'Integration and Final Validation' (Protocol in workflow.md) [checkpoint: 754fbe5]
|
||||
@@ -18,7 +18,7 @@ paths = [
|
||||
"C:/projects/forth/bootslop/bootslop.toml",
|
||||
"C:\\projects\\manual_slop\\tests\\temp_project.toml",
|
||||
]
|
||||
active = "C:\\projects\\manual_slop\\tests\\temp_project.toml"
|
||||
active = "manual_slop.toml"
|
||||
|
||||
[gui.show_windows]
|
||||
"Context Hub" = true
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user