Skip to content

fix: update stale implementation.md fallback-input and FileChangeHandler sections (#1063)#1065

Merged
microsasa merged 2 commits intomainfrom
fix/1063-stale-implementation-md-b788b076bfa5bc1b
Apr 23, 2026
Merged

fix: update stale implementation.md fallback-input and FileChangeHandler sections (#1063)#1065
microsasa merged 2 commits intomainfrom
fix/1063-stale-implementation-md-b788b076bfa5bc1b

Conversation

@microsasa
Copy link
Copy Markdown
Owner

Closes #1063

Changes

Updates three stale documentation sections in src/copilot_usage/docs/implementation.md:

  1. Fallback input section — Replaced the outdated "Fallback to blocking input()" section with the current threaded _start_input_reader_thread() approach: daemon thread, queue.SimpleQueue, _FALLBACK_EOF sentinel, lazy initialization on first ValueError/OSError.

  2. FileChangeHandler section — Renamed _FileChangeHandlerFileChangeHandler, corrected its module to interactive.py, updated the code snippet to use WATCHDOG_DEBOUNCE_SECS constant and match current typed signatures.

  3. Observer section — Updated to reference start_observer() / stop_observer() in interactive.py instead of inline Observer() construction in cli.py.

Testing

Added test_implementation_md_symbols_exist_in_expected_modules to tests/test_docs.py that verifies key symbol names referenced in implementation.md actually exist in their stated modules:

  • FileChangeHandler exported from copilot_usage.interactive
  • _start_input_reader_thread accessible in copilot_usage.cli
  • start_observer / stop_observer exported from copilot_usage.interactive
  • WATCHDOG_DEBOUNCE_SECS exported from copilot_usage.interactive

This prevents future renames from silently drifting out of sync with the docs.

Warning

⚠️ Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • astral.sh
  • pypi.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "astral.sh"
    - "pypi.org"

See Network Configuration for more information.

Generated by Issue Implementer · ● 10.9M ·

… tests

Update three stale documentation sections in implementation.md:

1. Replace 'Fallback to blocking input()' with the current threaded
   _start_input_reader_thread() approach (daemon thread, SimpleQueue,
   _FALLBACK_EOF sentinel, lazy initialization).

2. Rename _FileChangeHandler → FileChangeHandler, correct module to
   interactive.py, update code snippet to use WATCHDOG_DEBOUNCE_SECS
   and match current signatures.

3. Update observer section to reference start_observer()/stop_observer()
   in interactive.py instead of inline Observer() construction.

Add test_implementation_md_symbols_exist_in_expected_modules to
tests/test_docs.py verifying that key symbol names referenced in
implementation.md actually exist in their stated modules.

Closes #1063

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 23, 2026 22:10
@microsasa microsasa added the aw Created by agentic workflow label Apr 23, 2026
@microsasa microsasa enabled auto-merge April 23, 2026 22:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates implementation.md to reflect the current interactive-loop implementation (threaded stdin fallback + watchdog observer helpers), and adds a unit test to prevent future documentation drift by asserting referenced symbols still exist.

Changes:

  • Refreshes implementation.md sections for the threaded _start_input_reader_thread() fallback and watchdog observer lifecycle (start_observer() / stop_observer()).
  • Updates the file watcher handler documentation to use FileChangeHandler and WATCHDOG_DEBOUNCE_SECS as implemented in interactive.py.
  • Adds test_implementation_md_symbols_exist_in_expected_modules to assert key documented symbols exist and (for public ones) are exported via __all__.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
tests/test_docs.py Adds a symbol-existence test intended to keep implementation.md aligned with actual module symbols/exports.
src/copilot_usage/docs/implementation.md Updates stale interactive-loop documentation for stdin fallback threading and watchdog observer/handler structure.

Comment thread src/copilot_usage/docs/implementation.md Outdated
Comment thread src/copilot_usage/docs/implementation.md Outdated
Comment thread tests/test_docs.py
@microsasa microsasa added the aw-review-response-1 Review response round 1 label Apr 23, 2026
- Correct fallback trigger wording to match actual failure modes
  (non-selectable stdin on Windows, detached stdin in tests)
- Accurately document daemon thread lifecycle limitations
  (no explicit teardown; may outlive _interactive_loop call)
- Strengthen symbol-existence test to verify doc attributes each
  symbol to the correct module file, not just symbol presence

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

Commit pushed: a8b4ea1

Generated by Review Responder

Copy link
Copy Markdown

Copilot AI left a comment

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 2 out of 2 changed files in this pull request and generated no new comments.

@microsasa microsasa added the aw-quality-gate-approved Quality gate approved the PR label Apr 23, 2026
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Low-impact documentation update with meaningful symbol-existence tests. Changes update three stale implementation.md sections to match current code and add a test preventing future drift. No business logic, API, or data model changes. Auto-approving for merge.

@microsasa microsasa merged commit a8ecfa7 into main Apr 23, 2026
10 checks passed
@microsasa microsasa deleted the fix/1063-stale-implementation-md-b788b076bfa5bc1b branch April 23, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aw Created by agentic workflow aw-quality-gate-approved Quality gate approved the PR aw-review-response-1 Review response round 1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aw][code health] implementation.md fallback-input and FileChangeHandler sections are stale

2 participants