Spaces:
Runtime error
Runtime error
Commit History
-
Feat: /capture endpoint core (Phase A) — single-post extraction
Refactors _run_url_pipeline's extract core into shared _places_from_caption() (analyze_batch → split_multi_venue → location-tag coords). New POST /capture accepts embed_html (the iOS Shortcut fetches /embed/captioned/ on-device so the server never touches Instagram), or a ready caption, or a url (local fetch), plus optional lat/lng for a free location-tag pin. Returns {places, count}. BYOK api_key. tests/test_capture.py added to CI; e2e still green (refactor safe). Inbox delivery (Phase B) and the Shortcut itself (Phase C) are next. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>8221e29 -
Feat: living-library merge on import (Phase 1)
POST /import now accepts an optional merge_into field (the caller's existing library CSV). The uploaded file is folded into it server-side via _merge_rows, keyed on instagram_url (else normalized name|city), keep-existing-wins — so user-owned status and manual edits are never overwritten and only genuinely new posts are added. Response gains added/merged/no_overlap. Client (importPlacesFile) sends the cached localStorage library as merge_into (unless restoring, which forceReplaces), shows an "N new places added" banner, and offers Replace when nothing in the file matched the library. Also fixes the restore card lingering after a library loads (showSubTabBar now hides it). This is the linchpin of the hybrid plan — it's what lets a capture/Shortcut or a re-import grow one living map instead of replacing it. Pinned by tests/test_merge.py (added to CI guardrails). Phase 2 (server-side warm-start cost-skip for bulk re-export) is next. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.c…d1b556d -
Feat: client-side library persistence (localStorage restore card)
Cache the canonical CSV in the browser after load and write-through on every edit (status, fields, coords). A returning visitor with no live job sees a #restore-card that replays the cached CSV through /import — a pure reconstruction-cache, so status/coords/edits round-trip losslessly with no new data shape and no server change. Stored only on-device; Download stays the durable backup. Works in both deployment modes (no HOSTED branch). - app.js: importPlacesFile() refactored out of handleImportFile; cacheLibrary/ cacheLibrarySoon/maybeShowRestore + restore/forget handlers; quota note - index.html + app.css: #restore-card above the import card - tests/test_persistence.py: cache/restore round-trip is lossless (CI guardrail) - docs: README, CLAUDE.md, TODO (item marked done; IndexedDB deferred) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1c43cdb
-
Add end-to-end pipeline test through the real routes (CI)
tests/test_e2e.py drives the actual FastAPI routes — GET /, upload → extract → geocode → export → results → KML/GeoJSON download, and the chatbot prepare → process flow — with ONLY the two third-party boundaries mocked (the LLM analyze_batch and the Nominatim geocode_row). Everything else runs for real. This covers the integration gaps that let two 500s reach production (the TemplateResponse signature and the chatbot get_prompt KeyError). Wired into the guardrails CI job (installs httpx for Starlette's TestClient). CLAUDE.md lists it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>925baf1 -
CI: bump actions to Node 24 versions
Silence the Node-20 deprecation warnings: checkout@v4→v6, setup-python@v5→v6, upload-artifact@v4→v7 across the CI and HF-sync workflows. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>58b1e9c -
#15: optional GitHub→HF Space sync workflow
.github/workflows/sync-hf-space.yml mirrors master to the HF Space on push: swaps deploy/hf-spaces/README.md in as the Space root README and force-pushes to the Space's main. No-ops until HF_TOKEN (secret) + HF_SPACE (variable) are configured, so it's safe to land now. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>dedd3f6 -
Demarcate the two deployment modes + add guardrails, CLAUDE.md
The app ships in two web shapes over one codebase (local Docker vs hosted free web), differentiated only by env config. Make each mode's contract explicit and guard against a change to one breaking the other. Guardrails: - Extract pure helpers encoding each contract: web.app.resolve_provider() (hosted hides Ollama -> Claude; local honors it) and pipeline.geocode.public_bulk_blocked() (HOSTED=1 + public OSM refused; unset/self-hosted allowed). Behavior unchanged; now unit-testable. - tests/test_deployment_modes.py pins both columns (hosted vs local). - CI: add a fast `guardrails` job (no Ollama) running the deployment-mode + prefilter tests on every push. CI fix: benchmark.yml set working-directory/artifact path to a nonexistent nested `your_instagram_activity/saved` folder (repo root IS that folder), so the existing benchmark job could never run. Fixed both. Docs: - DEPLOY.md — the two options side-by-side + the guardrail that protects them. - deploy/hosted.env.example — hos…c68fdea
-
Feature: quality benchmark suite + CI regression test
Adds a full testing pipeline for measuring and tracking extraction quality across all models: - tests/create_fixture.py — deterministic sampler: 50 posts from saved_posts.json (30 food candidates + 20 non-food), diversified by creator and hashtag set, with guaranteed edge-case coverage (thin captions, no hashtags) - tests/fixtures/sampled_posts.json — the 50-post fixture (checked in, seed=42) - tests/generate_ground_truth.py — runs sampled posts through Claude Opus 4.8 to produce the authoritative oracle; checkpointed so it's resumable - tests/fixtures/test_posts.json — 50 Opus 4.8–labelled ground truth records (30 food / 20 not-food); this is the permanent benchmark oracle - tests/benchmark.py — CLI runner that evaluates any model/provider against the oracle. Metrics: is_food_accuracy (40%), name_recall fuzzy (25%), city_recall (15%), field_completeness (20%) → composite_score. Writes tests/benchmark_results.json. First result: claude-haiku-4-5 scores 89.1 at $0.055…a42a323