Context
FEAT-007 (Pane Log Attachment and Offset Tracking) ships at 124/137 tasks (91%). Every remaining item is intentionally deferred with a documented reason in specs/007-log-attachment-offsets/tasks.md § "Reconciliation Appendix". This issue tracks the subset that needs post-FEAT-008 attention so the deferrals don't get lost.
Items already inherited by FEAT-008 (T173/T175/T176/T177) are documented in docs/mvp-feature-sequence.md § FEAT-008 → "Carried over from FEAT-007" and are NOT tracked here.
Code-level block (cross-feature dependency)
T056 — tmux_unavailable rejection
- Spec: FR-013 — daemon refuses
attach-log with tmux_unavailable when the container has no tmux.
- Block:
tmux_present is hardcoded True in src/agenttower/logs/service.py:881. The check if container_record.get("tmux_present") is False: exists but never fires.
- Unblock: a future FEAT-003 (or follow-up) that persists a
tmux_present column on the containers table. Once persisted, change _resolve_active_container to read the column instead of returning the hardcoded constant; T056 then becomes integration-testable with the existing test_feat007_us1_error_paths.py pattern.
- Acceptance: T056 unit + integration tests land green; the appendix entry in
tasks.md flips to [X].
FEAT-007 polish items (low-priority, harness work)
T154 — US5 stale-recovery integration through CLI
- Spec: US5 AS1/AS2 / FR-042 — FEAT-004 reconcile flips bound row to stale; follow-up
attach-log recovers to active retaining offset.
- Currently covered: cascade unit-tested in
tests/integration/test_feat007_stale_cascade.py (4 cases); recovery branch unit-tested in tests/unit/test_logs_us4_us5_us7_units.py:test_t150_* and test_t151_*.
- Gap: end-to-end CLI round-trip would drive FEAT-004 reconcile from the test, which adds harness complexity for marginal trace-matrix value. Easier to do once FEAT-008's reader integration tests land harness for forced reconcile cycles.
T212 — orphan recovery integration through daemon startup
- Spec: FR-043 — daemon startup with a fake container whose pane has a canonical pipe target but no row; assert one
log_attachment_orphan_detected event, no auto-attach, no docker exec issued by daemon for binding.
- Currently covered:
tests/unit/test_logs_orphan_recovery.py (8 cases including suppression).
- Gap: an integration version against a real daemon subprocess would re-verify the same logic. Low value-add on top of unit coverage.
Architectural cleanup (revisit only if indirection becomes valuable)
These four tasks specified extracting helpers that were intentionally inlined during FEAT-007 implementation. Functional behavior is fully covered today; the tasks remain unchecked because the named modules don't exist as separate files. Each is "wontfix unless someone needs the abstraction."
T002 — src/agenttower/logs/__init__.py re-export stubs
- Concrete classes (
LogAttachmentRecord, LogOffsetRecord, AttachLogRequest, LogService, LogRedactor) are imported directly from their owning modules.
- Worth doing if external code starts importing FEAT-007 types and the module-internal paths feel like a leaky abstraction.
T005 — typed wrappers in src/agenttower/socket_api/client.py
- Spec:
attach_log(), detach_log(), attach_log_status(), attach_log_preview() typed wrappers.
- Today:
cli.py calls send_request(socket_path, "attach_log", params) directly. Works fine; wrappers would only matter if a second client surface (TUI, plugin) emerges that wants typed call sites.
T070 — src/agenttower/logs/client_resolve.py
- Spec: client-side resolver invoked by
cli.py for attach-log / detach-log.
- Today: resolution logic inlined in
cli.py:_attach_log_command and _detach_log_command.
- Worth extracting if a second invocation path (e.g., a TUI) needs the same resolver.
T121 — src/agenttower/logs/preview.py
- Spec:
read_tail_lines(host_path, n) -> list[str] reverse-reads the host file with hard cap 200×64KiB.
- Today:
read_tail_lines lives in logs/host_fs.py; LogService.attach_log_preview calls it directly.
- Worth extracting only if preview gains additional pipeline stages (custom redactors, filters).
Acceptance for closing this issue
References
specs/007-log-attachment-offsets/tasks.md § Reconciliation Appendix
docs/mvp-feature-sequence.md § FEAT-008 (carries T173/T175/T176/T177)
- FEAT-007 PR (TBD)
Context
FEAT-007 (Pane Log Attachment and Offset Tracking) ships at 124/137 tasks (91%). Every remaining item is intentionally deferred with a documented reason in
specs/007-log-attachment-offsets/tasks.md§ "Reconciliation Appendix". This issue tracks the subset that needs post-FEAT-008 attention so the deferrals don't get lost.Items already inherited by FEAT-008 (T173/T175/T176/T177) are documented in
docs/mvp-feature-sequence.md§ FEAT-008 → "Carried over from FEAT-007" and are NOT tracked here.Code-level block (cross-feature dependency)
T056 —
tmux_unavailablerejectionattach-logwithtmux_unavailablewhen the container has no tmux.tmux_presentis hardcodedTrueinsrc/agenttower/logs/service.py:881. The checkif container_record.get("tmux_present") is False:exists but never fires.tmux_presentcolumn on thecontainerstable. Once persisted, change_resolve_active_containerto read the column instead of returning the hardcoded constant; T056 then becomes integration-testable with the existingtest_feat007_us1_error_paths.pypattern.tasks.mdflips to[X].FEAT-007 polish items (low-priority, harness work)
T154 — US5 stale-recovery integration through CLI
attach-logrecovers to active retaining offset.tests/integration/test_feat007_stale_cascade.py(4 cases); recovery branch unit-tested intests/unit/test_logs_us4_us5_us7_units.py:test_t150_*andtest_t151_*.T212 — orphan recovery integration through daemon startup
log_attachment_orphan_detectedevent, no auto-attach, no docker exec issued by daemon for binding.tests/unit/test_logs_orphan_recovery.py(8 cases including suppression).Architectural cleanup (revisit only if indirection becomes valuable)
These four tasks specified extracting helpers that were intentionally inlined during FEAT-007 implementation. Functional behavior is fully covered today; the tasks remain unchecked because the named modules don't exist as separate files. Each is "wontfix unless someone needs the abstraction."
T002 —
src/agenttower/logs/__init__.pyre-export stubsLogAttachmentRecord,LogOffsetRecord,AttachLogRequest,LogService,LogRedactor) are imported directly from their owning modules.T005 — typed wrappers in
src/agenttower/socket_api/client.pyattach_log(),detach_log(),attach_log_status(),attach_log_preview()typed wrappers.cli.pycallssend_request(socket_path, "attach_log", params)directly. Works fine; wrappers would only matter if a second client surface (TUI, plugin) emerges that wants typed call sites.T070 —
src/agenttower/logs/client_resolve.pycli.pyforattach-log/detach-log.cli.py:_attach_log_commandand_detach_log_command.T121 —
src/agenttower/logs/preview.pyread_tail_lines(host_path, n) -> list[str]reverse-reads the host file with hard cap 200×64KiB.read_tail_lineslives inlogs/host_fs.py;LogService.attach_log_previewcalls it directly.Acceptance for closing this issue
References
specs/007-log-attachment-offsets/tasks.md§ Reconciliation Appendixdocs/mvp-feature-sequence.md§ FEAT-008 (carries T173/T175/T176/T177)