Repository navigation
feat(skill): StateStore + scraper rename + doc date sweep - #12
Conversation
Three small polish items in one PR, all deferred from PR #10: 1. aso_skill.StateStore -- minimal per-app state store under outputs/<app>/.state/current.json. Atomic write via tempfile + os.replace; schema_version: 1; raises on future-version files. Unlocks the ASO Watcher and resume-on-failure work without committing to a larger design surface. 2. Rename scraper.py -> webfetch_prompts.py. The module builds {url, prompt} dicts that the agent feeds into its WebFetch tool; it does no HTTP. The old path is preserved as a backward-compat symlink so external references keep working. 3. Update the 11 hardcoded November 7, 2025 footers across docs to 2026-05-19. Historical dates (release tags, "Actual Completion: ..." markers, fixture timestamps in sample API responses) are intentionally left as-is. 10 new tests in tests/test_state.py. Full suite: 60 passed in 2.79s. https://claude.ai/code/session_01CbA3Mp4rD4vW9Yjd2aPEXw
|
Large PR alert: this PR has 1257 changes. Consider splitting it into smaller PRs (<200 changes) for faster review and fewer conflicts. |
|
Branch |
Code Review — PR #12: StateStore + scraper rename + doc date sweepOverall: Solid, well-scoped PR. The atomic-write design is correct, tests are comprehensive, and the rename accurately reflects what the module does. Three issues need attention before merge — one security, two correctness. Bugs / Must-Fix1. Path traversal in
|
Summary
Three small polish items deferred from PR #10, bundled into one PR per your preference.
1.
aso_skill.StateStore— minimal per-app stateNew module
aso_skill/state.pypersists per-app state tooutputs/<app>/.state/current.json. Atomic write (tempfile +os.replace)so a crash during save cannot corrupt the file. Schema-versioned
(
schema_version: 1); a future-version file raises rather than silentlycorrupting.
Slots:
apple_metadata,google_metadata,keyword_set,last_aso_score,competitors. API:load(),save(),update(**slots),exists,path. Unknown top-level keys are preserved on load so a futureschema addition doesn't lose data written by newer clients.
This unlocks the ASO Watcher and resume-on-failure work in
follow-up PRs without committing to a larger design surface in this one.
10 new tests in
tests/test_state.py.2.
scraper.py→aso_skill/webfetch_prompts.pyThe module builds
{url, prompt}dicts the agent feeds into itsWebFetchtool — it does no HTTP itself. The name was misleading. Newcanonical location is
aso_skill/webfetch_prompts.py;app-store-optimization/lib/scraper.pyremains as a backward-compatsymlink. Two doc references updated (
ARCHITECTURE.md,data_sources.md).3. Documentation date sweep
Replaced the 11 hardcoded
November 7, 2025/Date:/Last Updated:footers across README, INSTALL, USAGE, ARCHITECTURE, the implementation
plan, branch-protection-setup.md, the strategist's "Ongoing Tasks"
template, and CHANGELOG with
2026-05-19. Bumped affectedVersion:labels from 1.0 → 1.1.
Intentionally left as-is (historical / immutable):
[1.0.0] - 2025-11-07version tagsRelease Date:in the project READMEActual Completion: November 7, 2025in the implementation planFetched: November 7, 2025, 10:30 AM PSTinside a sample API responsefixture in
data_sources.mdTest plan
python3 -m pytest tests/ -q→ 60 passed in 2.79s (50 prior + 10 new state tests)ruff check aso_skill scripts tests→ All checks passedruff format --check aso_skill scripts tests→ 28 files already formattedreadlink -f app-store-optimization/lib/scraper.py→aso_skill/webfetch_prompts.pygrep -rn "November 7, 2025" .claude/ documentation/ README.md CHANGELOG.md→ only the 6 historical references listed above remainpython3 -c "from aso_skill import StateStore; s = StateStore('Demo'); print(s.path)"→outputs/Demo/.state/current.jsonhttps://claude.ai/code/session_01CbA3Mp4rD4vW9Yjd2aPEXw
Generated by Claude Code