PMTL Verify Search Sync
Purpose
Verify PMTL search behavior, index freshness, and fallback integrity so search-related changes are checked against the current design-first model instead of assumed from code reading.
Use When
- Changing search schemas, Meilisearch integration, indexing, reindex flows, fallback behavior, or search result mapping.
- Touching admin search ops, source freshness reporting, or index sync/replay paths.
- Reviewing whether search still degrades safely when the engine is unavailable.
Required Inputs
- touched search surface: query path, index sync, admin ops, or result mapping
- active engine/runtime assumptions for the current environment
- whether the task expects contract verification, engine verification, or both
Expected Output
- Evidence about search freshness, reindex behavior, and engine health for the touched path.
- A clear note when the helper only covers part of the changed search surface.
Execution Approach
- Identify whether the change affects query shape, result mapping, index sync, admin ops, or engine fallback.
- Run the helper lane first for fast evidence.
- Read the current search owner docs before trusting the helper as complete coverage.
- Add targeted checks when the change touches contracts or UI semantics beyond raw reindex health.
Default workflow
- Rebuild or batch reindex posts.
- Check Meilisearch health.
- Inspect search status, freshness, or fallback behavior if the index does not update.
Script
Primary entrypoint: py infra/tools/codex_actions.py search-sync ...
Compatibility wrapper: scripts/run_search_sync_check.py
py infra/tools/codex_actions.py search-sync --all-pages
py infra/tools/codex_actions.py search-sync --page 1 --limit 100
Verification
- Confirm the helper command exit code and engine health before claiming search is healthy.
- If the change touched contracts, also verify response shape against the design contract rather than only checking engine availability.
- If Meilisearch or worker lanes are not active for the current scope, state that verification stayed on the current active path.
- When search fallback is part of the task, verify that failure does not corrupt canonical content ownership.
Quality Criteria
- Verification distinguishes query-path correctness, index freshness, and engine-health status.
- Search helper output is not over-interpreted as full FE/API/search-contract coverage.
- Findings stay aligned with PMTL rules: SQL fallback, source-of-truth in DB, no search index authority drift.
Edge Cases
- Current helper is still biased toward the existing reindex + engine-health lane; it is not a full search UX or contract verifier.
- Search changes that affect result mapping or
docType/entryType/sourceFamily need doc-level contract checks in addition to command output.
- If Meilisearch is not the active engine, say so plainly instead of pretending full sync was verified.
Read when needed
design/06-search/contracts.md
design/06-search/meilisearch-architecture.md
design/tracking/api-route-inventory.md
docs/runbooks.md
docs/troubleshooting.md
Pair with
pmtl-production-baseline for runtime/search policy drift.
pmtl-verify-quality-gate after meaningful code changes.
1---2name: pmtl-verify-search-sync3description: PMTL_VN search verification skill. Use when changing search schemas, Meilisearch integration, indexing, fallback search behavior, or search result mapping so index sync is checked with commands and health probes.4---5
6# PMTL Verify Search Sync
7
8## Purpose
9
10Verify PMTL search behavior, index freshness, and fallback integrity so search-related changes are checked against the current design-first model instead of assumed from code reading.
11
12## Use When
13
14- Changing search schemas, Meilisearch integration, indexing, reindex flows, fallback behavior, or search result mapping.
15- Touching admin search ops, source freshness reporting, or index sync/replay paths.
16- Reviewing whether search still degrades safely when the engine is unavailable.
17
18## Required Inputs
19
20- touched search surface: query path, index sync, admin ops, or result mapping
21- active engine/runtime assumptions for the current environment
22- whether the task expects contract verification, engine verification, or both
23
24## Expected Output
25
26- Evidence about search freshness, reindex behavior, and engine health for the touched path.
27- A clear note when the helper only covers part of the changed search surface.
28
29## Execution Approach
30
311. Identify whether the change affects query shape, result mapping, index sync, admin ops, or engine fallback.
322. Run the helper lane first for fast evidence.
333. Read the current search owner docs before trusting the helper as complete coverage.
344. Add targeted checks when the change touches contracts or UI semantics beyond raw reindex health.
35
36## Default workflow
37
381. Rebuild or batch reindex posts.
392. Check Meilisearch health.
403. Inspect search status, freshness, or fallback behavior if the index does not update.
41
42## Script
43
44Primary entrypoint: `py infra/tools/codex_actions.py search-sync ...`
45
46Compatibility wrapper: `scripts/run_search_sync_check.py`
47
48```bash
49py infra/tools/codex_actions.py search-sync --all-pages
50py infra/tools/codex_actions.py search-sync --page 1 --limit 100
51```
52
53## Verification
54
55- Confirm the helper command exit code and engine health before claiming search is healthy.
56- If the change touched contracts, also verify response shape against the design contract rather than only checking engine availability.
57- If Meilisearch or worker lanes are not active for the current scope, state that verification stayed on the current active path.
58- When search fallback is part of the task, verify that failure does not corrupt canonical content ownership.
59
60## Quality Criteria
61
62- Verification distinguishes query-path correctness, index freshness, and engine-health status.
63- Search helper output is not over-interpreted as full FE/API/search-contract coverage.
64- Findings stay aligned with PMTL rules: SQL fallback, source-of-truth in DB, no search index authority drift.
65
66## Edge Cases
67
68- Current helper is still biased toward the existing reindex + engine-health lane; it is not a full search UX or contract verifier.
69- Search changes that affect result mapping or `docType/entryType/sourceFamily` need doc-level contract checks in addition to command output.
70- If Meilisearch is not the active engine, say so plainly instead of pretending full sync was verified.
71
72## Read when needed
73
74- `design/06-search/contracts.md`
75- `design/06-search/meilisearch-architecture.md`
76- `design/tracking/api-route-inventory.md`
77- `docs/runbooks.md`
78- `docs/troubleshooting.md`
79
80## Pair with
81
82- `pmtl-production-baseline` for runtime/search policy drift.
83- `pmtl-verify-quality-gate` after meaningful code changes.