Stephen Lee commited on
Commit
dbfe2d0
·
1 Parent(s): 63bec9a

Polish CoastWise submission readiness

Browse files
README.md CHANGED
@@ -6,9 +6,12 @@ license: mit
6
  tags:
7
  - build-small-hackathon
8
  - backyard-ai
 
9
  - tiny-titan
10
  - off-the-grid
11
  - off-brand
 
 
12
  - openai-codex
13
  ---
14
 
@@ -30,8 +33,9 @@ Target badges and awards, pending final evidence:
30
 
31
  - Best Agent: active-session workflow trace from search/photo candidate to
32
  deterministic rule/advisory result and constrained explanation.
33
- - Tiny Titan / Bonus Quest Champion: submitted models must stay at or below 4B
34
- parameters.
 
35
  - Off the Grid: cached name lookup, rule cards, and advisory overlays work
36
  without cloud APIs.
37
  - Off Brand: custom CoastWise Gradio interface.
@@ -40,6 +44,10 @@ Target badges and awards, pending final evidence:
40
  - OpenAI Codex: GitHub can remain private; public Hugging Face Space history
41
  must include Codex-attributed commits as judge-visible evidence.
42
 
 
 
 
 
43
  ## MVP Scope
44
 
45
  - Name search for curated San Francisco coast species, aliases, and grouped
@@ -54,22 +62,41 @@ Target badges and awards, pending final evidence:
54
 
55
  ## Model Inventory
56
 
57
- | Model | Provider | Role | Parameters | Runtime mode | Notes |
58
- |---|---|---:|---:|---|---|
59
- | MiniCPM5-1B | OpenBMB | Constrained safety-result explanation | 1.0B | Disabled/mocked fallback in current local MVP | Planned <=4B user-visible model path; deterministic safety result remains authoritative |
60
 
61
  Optional future path: MiniCPM-V 4.6 may assist or rerank photo candidates only
62
  inside the curated reference-image candidate set. No model fine-tuning is
63
  required for the MVP.
64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  ## Demo And Public Evidence
66
 
67
- - Demo video: placeholder, add public link before final submission.
68
- - Social post: placeholder, add public link before final submission.
69
- - Public Space history: push meaningful Codex-attributed commits to the Hugging
70
- Face Space repository before claiming the OpenAI Codex award.
71
- - Source freshness: cached CDFW/CDPH data is labeled and treated as stale after
72
- 30 days.
73
 
74
  ## Local Run
75
 
 
6
  tags:
7
  - build-small-hackathon
8
  - backyard-ai
9
+ - openbmb
10
  - tiny-titan
11
  - off-the-grid
12
  - off-brand
13
+ - best-agent
14
+ - best-demo
15
  - openai-codex
16
  ---
17
 
 
33
 
34
  - Best Agent: active-session workflow trace from search/photo candidate to
35
  deterministic rule/advisory result and constrained explanation.
36
+ - OpenBMB: MiniCPM5-1B is the planned small-model path for constrained
37
+ safety-result explanation.
38
+ - Tiny Titan: the submitted model inventory stays at or below 4B parameters.
39
  - Off the Grid: cached name lookup, rule cards, and advisory overlays work
40
  without cloud APIs.
41
  - Off Brand: custom CoastWise Gradio interface.
 
44
  - OpenAI Codex: GitHub can remain private; public Hugging Face Space history
45
  must include Codex-attributed commits as judge-visible evidence.
46
 
47
+ Not claimed in the current MVP: NVIDIA, Modal, or Bonus Quest Champion. Those
48
+ should only be added if the final build includes the required sponsor/platform
49
+ evidence.
50
+
51
  ## MVP Scope
52
 
53
  - Name search for curated San Francisco coast species, aliases, and grouped
 
62
 
63
  ## Model Inventory
64
 
65
+ | Model | Provider | Source URL | Role | Parameters | Runtime mode | Required for core safety | Award relevance |
66
+ |---|---|---|---|---:|---|---|---|
67
+ | MiniCPM5-1B | OpenBMB | https://huggingface.co/openbmb/MiniCPM5-1B | Constrained safety-result explanation | 1.0B | Disabled/mocked fallback in current local MVP | No | OpenBMB, Tiny Titan |
68
 
69
  Optional future path: MiniCPM-V 4.6 may assist or rerank photo candidates only
70
  inside the curated reference-image candidate set. No model fine-tuning is
71
  required for the MVP.
72
 
73
+ All listed models are under the hackathon 32B cap. Tiny Titan remains eligible
74
+ only while every submitted model stays at or below 4B total parameters.
75
+
76
+ ## Official Sources And Freshness
77
+
78
+ Cached official source metadata is bundled for offline lookup. CoastWise treats
79
+ cached rule or advisory data older than 30 days as stale and caps harvest-minded
80
+ guidance at `verify_before_harvest` unless a stricter `do_not_harvest` rule
81
+ already applies.
82
+
83
+ Cache date for the current curated source set: 2026-06-13.
84
+
85
+ | Source | Use | Cached URL |
86
+ |---|---|---|
87
+ | CDFW San Francisco Region Ocean Regulations | San Francisco coast species and rule-card baseline | https://wildlife.ca.gov/Fishing/Ocean/Regulations/Fishing-Map/San-Francisco |
88
+ | CDFW Ocean Sport Fishing | General ocean sport fishing source for grouped cards | https://wildlife.ca.gov/Fishing/Ocean/Regulations |
89
+ | CDPH Shellfish Advisories | Shellfish advisory overlay source | https://www.cdph.ca.gov/Programs/OPA/Pages/Shellfish-Advisories.aspx |
90
+ | CDPH Annual Mussel Quarantine | Annual mussel quarantine overlay source | https://www.cdph.ca.gov/Programs/CEH/DRSEM/Pages/EMB/Shellfish/Annual-Mussel-Quarantine.aspx |
91
+
92
  ## Demo And Public Evidence
93
 
94
+ - Demo video: pending, add a public link before final submission.
95
+ - Social post: pending, add a public link before final submission.
96
+ - Public Space URL: pending, publish the Gradio Space under the official
97
+ hackathon organization before final submission.
98
+ - Public Space history: pending, push meaningful Codex-attributed commits to the
99
+ Hugging Face Space repository before claiming the OpenAI Codex award.
100
 
101
  ## Local Run
102
 
app.py CHANGED
@@ -21,14 +21,54 @@ from coastwise.submission import default_model_inventory
21
  APP_TITLE = "CoastWise"
22
 
23
  INTRO = """
24
- Offline California coastal species and harvest-safety lookup for the San
25
- Francisco coast MVP.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  """
27
 
28
  LIMITS = """
29
- CoastWise is a conservative decision-support guide. It does not certify species
30
- identification, legality, harvest authorization, or food safety. Verify current
31
- CDFW and CDPH guidance before harvesting or eating sport-harvested shellfish.
 
 
 
 
32
  """
33
 
34
  INTENT_LABELS = {
@@ -151,7 +191,7 @@ def render_photo_candidate(image) -> str:
151
 
152
 
153
  def build_app() -> gr.Blocks:
154
- with gr.Blocks(title=APP_TITLE) as demo:
155
  gr.Markdown(f"# {APP_TITLE}")
156
  gr.Markdown(INTRO)
157
  gr.Markdown(LIMITS)
@@ -186,4 +226,4 @@ demo = build_app()
186
 
187
 
188
  if __name__ == "__main__":
189
- demo.launch()
 
21
  APP_TITLE = "CoastWise"
22
 
23
  INTRO = """
24
+ Offline California coastal species lookup.
25
+
26
+ SF coast harvest-safety guidance.
27
+ """
28
+
29
+ APP_CSS = """
30
+ .gradio-container {
31
+ max-width: 100vw !important;
32
+ overflow-x: hidden !important;
33
+ }
34
+
35
+ .gradio-container,
36
+ .gradio-container * {
37
+ box-sizing: border-box;
38
+ }
39
+
40
+ .gradio-container .form,
41
+ .gradio-container .block,
42
+ .gradio-container .wrap,
43
+ .gradio-container fieldset {
44
+ max-width: 100% !important;
45
+ min-width: 0 !important;
46
+ }
47
+
48
+ .gradio-container p,
49
+ .gradio-container label,
50
+ .gradio-container h1,
51
+ .gradio-container h2,
52
+ .gradio-container h3 {
53
+ overflow-wrap: anywhere;
54
+ }
55
+
56
+ @media (max-width: 640px) {
57
+ .gradio-container {
58
+ padding-left: 16px !important;
59
+ padding-right: 16px !important;
60
+ }
61
+ }
62
  """
63
 
64
  LIMITS = """
65
+ Conservative decision-support only.
66
+
67
+ Does not certify species ID or legality.
68
+
69
+ Does not authorize harvest or food safety.
70
+
71
+ Verify CDFW/CDPH before harvest.
72
  """
73
 
74
  INTENT_LABELS = {
 
191
 
192
 
193
  def build_app() -> gr.Blocks:
194
+ with gr.Blocks(title=APP_TITLE, fill_width=True) as demo:
195
  gr.Markdown(f"# {APP_TITLE}")
196
  gr.Markdown(INTRO)
197
  gr.Markdown(LIMITS)
 
226
 
227
 
228
  if __name__ == "__main__":
229
+ demo.launch(css=APP_CSS)
specs/001-coastwise-lookup/quickstart.md CHANGED
@@ -258,6 +258,72 @@ Expected outcome:
258
  - README includes target track/badge tags, model inventory, prompt/model role
259
  notes, safety limitations, source freshness policy, demo-video link, and
260
  social-post link.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
261
  - Unsupported sponsor or bonus claims are absent.
262
  - Codex usage is documented and backed by public Space commit history if
263
  OpenAI Codex is claimed.
 
258
  - README includes target track/badge tags, model inventory, prompt/model role
259
  notes, safety limitations, source freshness policy, demo-video link, and
260
  social-post link.
261
+
262
+ ## Implementation Validation Log
263
+
264
+ Recorded on 2026-06-13 from the isolated `coastwise-implement` worktree.
265
+
266
+ ### Automated Suite
267
+
268
+ Command:
269
+
270
+ ```bash
271
+ PYTHONPYCACHEPREFIX=/private/tmp/coastwise-pycache .venv/bin/python -m pytest -v
272
+ ```
273
+
274
+ Result:
275
+
276
+ - 39 passed in 1.14s.
277
+ - Coverage included search, rule cards, CDPH advisory/quarantine logic,
278
+ generated-output constraints, reference-image photo candidates, privacy,
279
+ source freshness, and submission package validation.
280
+
281
+ ### Local Performance Snapshot
282
+
283
+ Measured with local Gradio 6.18.0, Python 3.13.12, mocked/disabled model path,
284
+ and deterministic in-process reference-image fallback.
285
+
286
+ | Path | Result |
287
+ |---|---:|
288
+ | Cold `app` import including Gradio | 4345.90 ms |
289
+ | `search_species("mussel")` average | 0.6572 ms |
290
+ | generated explanation fallback average | 0.0182 ms |
291
+ | reference-image photo fallback average | 0.0442 ms |
292
+ | Python tracemalloc peak | 80.03 MiB |
293
+ | Process max RSS, approximate | 202.28 MiB |
294
+
295
+ ### Manual UI Smoke
296
+
297
+ Local server:
298
+
299
+ ```text
300
+ http://127.0.0.1:8060
301
+ ```
302
+
303
+ Screenshots captured with headless Chrome:
304
+
305
+ - Desktop viewport 1280x900: `/private/tmp/coastwise-desktop-v3.png`
306
+ - Phone viewport 390x844: `/private/tmp/coastwise-mobile-v6.png`
307
+
308
+ Findings:
309
+
310
+ - Desktop first viewport is readable and primary lookup controls are visible.
311
+ - Phone first viewport has readable safety copy, usable controls, and no text
312
+ overlap or clipped first-viewport copy after the mobile-safe copy update.
313
+ - Deterministic safety guidance remains visually before generated explanation
314
+ in rendered result Markdown.
315
+ - Photo candidate section is visually separate from rule-card lookup.
316
+
317
+ ### Scenario Status
318
+
319
+ - Scenarios 1-12 are locally validated by the automated suite, local HTTP
320
+ smoke, rendered-result checks, and screenshot smoke.
321
+ - Scenario 13 is partially complete locally: README frontmatter, tags, model
322
+ inventory, source freshness policy, safety limitations, and public evidence
323
+ placeholders are present.
324
+ - Remaining external gap: publish the Hugging Face Space, record a public demo
325
+ video, publish a social post, and push Codex-attributed commits to the public
326
+ Space history before claiming final OpenAI Codex and Best Demo evidence.
327
  - Unsupported sponsor or bonus claims are absent.
328
  - Codex usage is documented and backed by public Space commit history if
329
  OpenAI Codex is claimed.
specs/001-coastwise-lookup/tasks.md CHANGED
@@ -207,16 +207,16 @@ export controls, and readable desktop and phone-sized layouts.
207
  **Purpose**: Final quality, performance, documentation, and submission-readiness
208
  work that cuts across all stories.
209
 
210
- - [ ] T060 Update final model names, source URLs, parameter counts, runtime modes, and award tags in `README.md`
211
- - [ ] T061 Update official source list, cache dates, and 30-day freshness policy in `README.md`
212
- - [ ] T062 Remove unsupported sponsor or bonus award claims from `README.md`
213
- - [ ] T063 Run the full automated suite with `PYTHONPYCACHEPREFIX=/private/tmp/coastwise-pycache pytest -v` covering `tests/`
214
- - [ ] T064 Measure search, generated explanation fallback, reference-image photo fallback, app import, and baseline memory budgets and record results in `specs/001-coastwise-lookup/quickstart.md`
215
- - [ ] T065 Complete desktop and phone-sized manual UI smoke validation and record findings in `specs/001-coastwise-lookup/quickstart.md`
216
- - [ ] T066 Validate all quickstart scenarios and record any gaps in `specs/001-coastwise-lookup/quickstart.md`
217
  - [ ] T067 Verify Hugging Face Space README frontmatter, demo-video link, social-post link, and public Space Codex commit evidence in `README.md`
218
- - [ ] T068 Run a final safety review for deterministic rule authority, generated-output constraints, source links, stale-data behavior, reference-image photo boundaries, and no-persistence behavior in `tests/test_rules.py`, `tests/test_ai.py`, `tests/test_photo.py`, `tests/test_reference_images.py`, and `tests/test_privacy.py`
219
- - [ ] T069 Review repository status and ensure generated artifacts are ready for either implementation handoff or commit in `specs/001-coastwise-lookup/tasks.md`
220
 
221
  ---
222
 
 
207
  **Purpose**: Final quality, performance, documentation, and submission-readiness
208
  work that cuts across all stories.
209
 
210
+ - [X] T060 Update final model names, source URLs, parameter counts, runtime modes, and award tags in `README.md`
211
+ - [X] T061 Update official source list, cache dates, and 30-day freshness policy in `README.md`
212
+ - [X] T062 Remove unsupported sponsor or bonus award claims from `README.md`
213
+ - [X] T063 Run the full automated suite with `PYTHONPYCACHEPREFIX=/private/tmp/coastwise-pycache pytest -v` covering `tests/`
214
+ - [X] T064 Measure search, generated explanation fallback, reference-image photo fallback, app import, and baseline memory budgets and record results in `specs/001-coastwise-lookup/quickstart.md`
215
+ - [X] T065 Complete desktop and phone-sized manual UI smoke validation and record findings in `specs/001-coastwise-lookup/quickstart.md`
216
+ - [X] T066 Validate all quickstart scenarios and record any gaps in `specs/001-coastwise-lookup/quickstart.md`
217
  - [ ] T067 Verify Hugging Face Space README frontmatter, demo-video link, social-post link, and public Space Codex commit evidence in `README.md`
218
+ - [X] T068 Run a final safety review for deterministic rule authority, generated-output constraints, source links, stale-data behavior, reference-image photo boundaries, and no-persistence behavior in `tests/test_rules.py`, `tests/test_ai.py`, `tests/test_photo.py`, `tests/test_reference_images.py`, and `tests/test_privacy.py`
219
+ - [X] T069 Review repository status and ensure generated artifacts are ready for either implementation handoff or commit in `specs/001-coastwise-lookup/tasks.md`
220
 
221
  ---
222