> For the complete documentation index, see [llms.txt](https://faction-os.gitbook.io/faction-os-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase18-session06-codebase-issue-scanners/tasks.md).

# Task Checklist

**Session ID**: `phase18-session06-codebase-issue-scanners` **Total Tasks**: 23 **Estimated Duration**: 3-4 hours **Created**: 2026-06-10

***

## Legend

* `[x]` = Completed
* `[ ]` = Pending
* `[P]` = Parallelizable (can run with other \[P] tasks)
* `[SNNMM]` = Session reference (NN=phase number, MM=session number)
* `TNNN` = Task ID

***

## Progress Summary

| Category       | Total  | Done   | Remaining |
| -------------- | ------ | ------ | --------- |
| Setup          | 3      | 3      | 0         |
| Foundation     | 6      | 6      | 0         |
| Implementation | 9      | 9      | 0         |
| Testing        | 5      | 5      | 0         |
| **Total**      | **23** | **23** | **0**     |

***

## Setup (3 tasks)

Initial configuration and environment preparation.

* [x] T001 \[S1806] Verify Session 05 summary, noise-filter, and manager issue APIs are present before adding scanner ingestion (`apps/server/src/managers/suggestionManager.ts`)
* [x] T002 \[S1806] Verify approved scan-root and safe relative-path rules for scanner roots (`apps/server/src/lib/llmPrivacy.ts`)
* [x] T003 \[S1806] Verify protocol issue enums, severity values, path validation, and per-category issue caps (`packages/protocol/src/suggestions.ts`)

***

## Foundation (6 tasks)

Core structures and base implementations.

* [x] T004 \[S1806] \[P] Create scanner option, result, cap, logger, and command-runner types with all scanner options defaulting to disabled (`apps/server/src/lib/codebaseIssueScanners.ts`)
* [x] T005 \[S1806] \[P] Create codebase issue scanner fixtures for accepted markers, rejected markers, and command outputs (`apps/server/tests/fixtures/codebase-issue-scanners/marker-fixtures.ts`)
* [x] T006 \[S1806] Create safe codebase issue factory with protocol validation, relative path normalization, and no raw file-content persistence (`apps/server/src/lib/codebaseIssueScanners.ts`)
* [x] T007 \[S1806] Create TODO-family marker parsing and false-positive filters for embedded identifiers, likely unbalanced strings, and empty messages (`apps/server/src/lib/codebaseIssueScanners.ts`)
* [x] T008 \[S1806] Create approved-root file scan adapter with bounded walking, deterministic ordering, and explicit loading, empty, and error result states (`apps/server/src/lib/codebaseIssueScanners.ts`)
* [x] T009 \[S1806] Create pure git, lint, build/typecheck, and test command-output parsers with bounded messages and explicit error mapping (`apps/server/src/lib/codebaseIssueScanners.ts`)

***

## Implementation (9 tasks)

Main feature implementation.

* [x] T010 \[S1806] Implement TODO, FIXME, HACK, XXX, and BUG scanning with severity mapping and capped per-type output (`apps/server/src/lib/codebaseIssueScanners.ts`)
* [x] T011 \[S1806] Implement git status scanner with injected command execution, timeout, max-output bounds, and failure-path handling (`apps/server/src/lib/codebaseIssueScanners.ts`)
* [x] T012 \[S1806] Implement lint scanner parser and command-backed scanner with timeout, bounded output, and compact nonzero-exit handling (`apps/server/src/lib/codebaseIssueScanners.ts`)
* [x] T013 \[S1806] Implement build/typecheck scanner parser and command-backed scanner with timeout, bounded output, and compact nonzero-exit handling (`apps/server/src/lib/codebaseIssueScanners.ts`)
* [x] T014 \[S1806] Implement test-failure scanner parser and command-backed scanner with timeout, bounded output, and compact nonzero-exit handling (`apps/server/src/lib/codebaseIssueScanners.ts`)
* [x] T015 \[S1806] Implement aggregate scan runner that only runs explicitly enabled scanners and reports capped counts without silent drops (`apps/server/src/lib/codebaseIssueScanners.ts`)
* [x] T016 \[S1806] Implement manager ingestion helper through `SuggestionManager.addCodebaseIssue` with duplicate-trigger prevention through manager dedupe (`apps/server/src/lib/codebaseIssueScanners.ts`)
* [x] T017 \[S1806] Document default-off scanner behavior, approved roots, no provider transfer, minimized output, and later Session 07 route ownership (`apps/server/README_server.md`)
* [x] T018 \[S1806] Verify planned scan and analysis routes remain unsupported until orchestration lands in Session 07 (`apps/server/src/lib/unsupportedRoutes.ts`)

***

## Testing (5 tasks)

Verification and quality assurance.

* [x] T019 \[S1806] \[P] Write marker scanner tests for accepted markers, severity mapping, false positives, empty messages, relative paths, and deterministic ordering (`apps/server/tests/codebaseIssueScanners.test.ts`)
* [x] T020 \[S1806] \[P] Write command parser tests for git status, lint, build/typecheck, test failures, timeout failures, missing commands, and oversized output (`apps/server/tests/codebaseIssueScanners.test.ts`)
* [x] T021 \[S1806] Write default-off, explicit-enable, approved-root, rejected-root, per-category cap, and capped-count tests (`apps/server/tests/codebaseIssueScanners.test.ts`)
* [x] T022 \[S1806] Write manager ingestion tests for dedupe, existing issue caps, and stored issue privacy through `SuggestionManager.addCodebaseIssue` (`apps/server/tests/codebaseIssueScanners.test.ts`)
* [x] T023 \[S1806] Run focused scanner tests, any extended manager tests, server typecheck, and ASCII/LF validation for new artifacts (`apps/server/tests/codebaseIssueScanners.test.ts`)

***

## Completion Checklist

Before marking session complete:

* [x] All tasks marked `[x]`
* [x] All tests passing
* [x] All files ASCII-encoded
* [x] implementation-notes.md updated
* [x] Ready for the validate workflow step

***

## Next Steps

Run the validate workflow step to verify session completeness.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://faction-os.gitbook.io/faction-os-docs/.spec_system/archive/sessions/phase18-session06-codebase-issue-scanners/tasks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
