Skip to content

Workspace Bandwidth Limit Phase 1 (top-K-per-epoch enforcement)#127

Closed
TSchonleber wants to merge 1 commit into
mainfrom
workspace-bandwidth-phase-1
Closed

Workspace Bandwidth Limit Phase 1 (top-K-per-epoch enforcement)#127
TSchonleber wants to merge 1 commit into
mainfrom
workspace-bandwidth-phase-1

Conversation

@TSchonleber
Copy link
Copy Markdown
Owner

Summary

Closes the second half of the May 15 audit's workspace 🟡 partial entry. Thalamus mode-broadcast closed the first half; this closes the bandwidth-limit half. Biology: Dehaene-Changeux global neuronal workspace has a hard ~4-chunk ignition bandwidth — workspace_broadcasts currently has no such constraint.

What's in

  • Migration 072 — 2 tables. Defaults: limit=4, epoch=60s, mode='shadow'.
  • 4 MCP toolsworkspace_bandwidth_status, _set, _admit, _epochs_history.
  • 3 enforcement modes — shadow (default, logs only), enforce (rejects over limit), disabled.
  • 9 tests, all green.

What's NOT in

  • No wiring into workspace_ingest yet (Phase 2).
  • No ARAS-modulated bandwidth (Phase 3).
  • No automatic enforce flip (Phase 4).

Live

  • Backup at ~/agentmemory/backups/brain.db.pre-wb-*.db
  • Migration 072 applied.
  • 9/9 tests green.

🤖 Generated with Claude Code

Closes the second half of the May 15 audit's workspace partial entry.
Thalamus mode-broadcast closed the first half (org_state coupling);
this closes the bandwidth-limit half. Biology: Dehaene-Changeux global
neuronal workspace has a hard ~4-chunk ignition bandwidth.

Phase 1 is bookkeeping + shadow enforcement. Phase 2 wires the limit
into workspace_ingest. Phase 3 lets ARAS modulate the bandwidth.

- Migration 072: workspace_bandwidth_state (single row, defaults:
  limit=4, epoch=60s, mode=shadow) + workspace_bandwidth_epochs
  (historical log of completed epochs with saturation tracking).
- mcp_tools_workspace_bandwidth: 4 tools (status, set, admit,
  epochs_history). admit returns admitted/rejected/saturated; in
  shadow mode all admits go through but saturated=True is logged;
  in enforce mode admits over the limit are rejected.
- Auto-rotation: status + admit check epoch expiry and roll the
  live counters into the historical table.
- 9 tests covering defaults, status, admit, saturation, enforce
  rejection, set validation, rotation timing, history filters.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@TSchonleber
Copy link
Copy Markdown
Owner Author

Superseded by #138 (brainctl-consolidation-v2), which already merged this work into main as part of the v2 tool surface consolidation. Closing as redundant.

@TSchonleber TSchonleber deleted the workspace-bandwidth-phase-1 branch May 21, 2026 08:15
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.

1 participant