You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/go/maintainer/development-tracker.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,6 +151,34 @@ Immediate next tasks:
151
151
152
152
### 2026-03-17 Session Update
153
153
154
+
- Completed: Removed the maintainer-only `--list-examples` / `--refresh-examples` execution path from the production `cleanup-follow-imports` and `audit-follow-imports` commands. Hygiene example catalogs now live only in `internal/app/follow_examples_test.go`, checked-in fixture rewrites happen through env-gated test helpers, and the operator/maintainer docs now describe that test-driven maintenance flow instead of advertising unsupported runtime flags.
155
+
- In progress: none.
156
+
- Blockers: none.
157
+
- Next step: decide whether the remaining cleanup/audit flag parsing should also move behind a smaller shared helper, or whether the next slice should return to a new operator-facing capability.
158
+
159
+
### 2026-03-17 Session Update
160
+
161
+
- Completed: Extended the shared follow/import example helper to cover example-mode flag parsing and validation as well as fixture IO. `cleanup-follow-imports` and `audit-follow-imports` now reuse the same `--list-examples` / `--refresh-examples[=<name[,name...]>]` parsing, duplicate-name normalization, incompatibility checks, and named-fixture validation, leaving only command-specific operational-target validation in `internal/app/import_follow.go`.
162
+
- In progress: none.
163
+
- Blockers: none.
164
+
- Next step: decide whether the remaining cleanup/audit option-parsing duplication is worth another shared helper, or whether follow/import work should pivot back to new operator-facing functionality.
165
+
166
+
### 2026-03-17 Session Update
167
+
168
+
- Completed: Refactored the follow/import example-fixture workflow behind a shared helper in `internal/app/follow_examples.go`. `cleanup-follow-imports` and `audit-follow-imports` now reuse the same base-dir resolution, example-name parsing, named fixture selection, list output, and refresh-writing logic instead of carrying two near-identical helper stacks, while keeping their command-specific example catalogs and renderers unchanged.
169
+
- In progress: none.
170
+
- Blockers: none.
171
+
- Next step: decide whether the current shared helper plus hard-coded example catalogs is the right steady state, or whether a later slice should move those example catalogs into a small manifest once the operator sample set grows further.
172
+
173
+
### 2026-03-17 Session Update
174
+
175
+
- Completed: Added checked-in `audit-follow-imports` sample outputs under `internal/app/testdata` together with `--list-examples` and `--refresh-examples[=<name[,name...]>]` maintenance helpers. The audit command now matches the cleanup command's fixture workflow, app and parser coverage verify example-mode parsing plus refresh/list wiring, and `TestAuditFollowImportsExampleOutputsStayInSync` fails if future audit renderer changes are not reflected in the checked-in fixtures and docs.
176
+
- In progress: none.
177
+
- Blockers: none.
178
+
- Next step: decide whether the audit example catalog is complete enough now, or whether future follow/import operator samples should move into a small manifest once the hard-coded fixture set grows further.
179
+
180
+
### 2026-03-17 Session Update
181
+
154
182
- Completed: Added `--policy-profile` presets to `scripts/readiness-check` with initial `ci` and `release` profiles. Profiles expand to the existing threshold and warning-policy flags instead of introducing a second policy engine: `ci` sets the current slow-run thresholds, while `release` adds the stale follow-health failure policy on top. Explicit flags still override profile thresholds and append extra warning codes, and the final text/JSON outputs now expose `policy_profile` alongside the already-expanded thresholds and warning-policy fields. Tests now cover profile parsing, override behavior, lint is clean again, and `go test ./...` remains green.
Copy file name to clipboardExpand all lines: docs/go/maintainer/mcp-integration.md
+21-6Lines changed: 21 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -235,20 +235,35 @@ That combined check now covers:
235
235
2. stdio MCP smoke test
236
236
3. HTTP MCP smoke test
237
237
238
-
The checked-in `cleanup-follow-imports` example outputs under [../../../internal/app/testdata](../../../internal/app/testdata/)now support the same maintainer loop. When the cleanup text or JSON renderer changes on purpose, refresh every cleanup fixture from the repository root with:
238
+
The checked-in `cleanup-follow-imports`and `audit-follow-imports`example outputs under [../../../internal/app/testdata](../../../internal/app/testdata/)still support a maintainer refresh loop, but that loop now lives only in test code so the packaged commands stay production-focused. When a hygiene-report renderer changes on purpose, refresh every cleanup fixture from the repository root with:
239
239
240
240
```powershell
241
-
go run ./cmd/codex-mem cleanup-follow-imports --refresh-examples
241
+
$env:CODEX_MEM_REFRESH_CLEANUP_EXAMPLES = "all"
242
+
go test ./internal/app -run TestRefreshCleanupFollowImportsExampleFixtures
If you only need a subset while iterating, list the current names first and then refresh the exact fixtures you touched:
246
+
Refresh every audit fixture the same way:
245
247
246
248
```powershell
247
-
go run ./cmd/codex-mem cleanup-follow-imports --list-examples
248
-
go run ./cmd/codex-mem cleanup-follow-imports --refresh-examples=filtered-cleanup-json
249
+
$env:CODEX_MEM_REFRESH_AUDIT_EXAMPLES = "all"
250
+
go test ./internal/app -run TestRefreshAuditFollowImportsExampleFixtures
251
+
Remove-Item Env:CODEX_MEM_REFRESH_AUDIT_EXAMPLES
249
252
```
250
253
251
-
Then rerun `go test ./internal/app -run TestCleanupFollowImportsExampleOutputsStayInSync` plus the normal repo checks so the updated cleanup fixtures are verified in read-only mode again.
254
+
If you only need a subset while iterating, pass the exact fixture names through the matching environment variable. The canonical names live in [../../../internal/app/follow_examples_test.go](../../../internal/app/follow_examples_test.go):
go test ./internal/app -run TestRefreshAuditFollowImportsExampleFixtures
263
+
Remove-Item Env:CODEX_MEM_REFRESH_AUDIT_EXAMPLES
264
+
```
265
+
266
+
Then rerun `go test ./internal/app -run "Test(Audit|Cleanup)FollowImportsExampleOutputsStayInSync"` plus the normal repo checks so the updated hygiene fixtures are verified in read-only mode again.
252
267
253
268
The default text summary from `scripts/readiness-check` echoes the `doctor.follow_imports` fields as flat `doctor_follow_imports_*` lines so CI or local automation can inspect last-known runtime watch health from the existing sidecar without having to parse the full doctor JSON again. The helper also emits explicit overall `started_at`, `completed_at`, and `duration_ms` fields plus per-phase `phase_*_status`, `phase_*_summary`, and timing lines for the `doctor`, stdio smoke, and HTTP smoke phases, so a failed run still tells automation which phase stopped progress and how long both the whole run and each attempted phase took before the command exits non-zero. `--json` returns one structured summary object that embeds the parsed doctor report, compact stdio/HTTP smoke-test summaries, and the same overall plus per-phase timing results. `--keep-going` keeps attempting later phases after an earlier failure, which is useful when you want one failing run to still capture as much phase state as possible. `--slow-run-ms` and `--slow-phase-ms` add explicit readiness warnings to both text and JSON output when thresholds are exceeded, `--fail-on-warning-code` lets automation promote selected warning codes, including nested doctor follow-health warning codes, into a failed readiness result, and `--policy-profile` expands a small set of documented presets into those same underlying options while still exposing the final thresholds and warning-policy state in the output. In all modes the follow-health fields are informational by default unless your own automation explicitly chooses to gate on them.
Copy file name to clipboardExpand all lines: docs/go/operator/import-ingestion.md
+28-9Lines changed: 28 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -183,10 +183,6 @@ Useful flags:
183
183
`cleanup-follow-imports` and `audit-follow-imports` only. Optional. Repeats or accepts comma-separated glob patterns that remove checkpoint and retry-artifact candidates from the matched set after includes are considered. Excludes win over includes.
184
184
-`--retention-profile stale|daily|reset`
185
185
`cleanup-follow-imports` and `audit-follow-imports` only. Optional. Expands to a documented default age threshold instead of making you spell out `--older-than` every time. `stale` means `1h`, `daily` means `24h`, and `reset` means `0s`. An explicit `--older-than` still overrides the profile.
186
-
-`--list-examples`
187
-
`cleanup-follow-imports` only. Maintainer-oriented. Lists the checked-in cleanup sample fixture names and relative paths.
188
-
-`--refresh-examples[=<name[,name...]>]`
189
-
`cleanup-follow-imports` only. Maintainer-oriented. Rewrites the checked-in cleanup sample outputs under `internal/app/testdata`. Run it from the repository root, or pass `--cwd <repo-root>` first; omit the value to refresh every fixture or pass one or more names to refresh only a subset.
190
186
191
187
## Event Schema
192
188
@@ -270,18 +266,41 @@ Checked-in sample outputs for common cleanup flows live under [../../../internal
If a deliberate cleanup-output change makes those fixtures drift, refresh them from the repository root with:
272
+
If a deliberate output change makes those fixtures drift, refresh the cleanup fixtures from the repository root through the test-only maintainer helper:
0 commit comments