diff --git a/CONTINUITY.md b/CONTINUITY.md index 18c516d..681c6fd 100644 --- a/CONTINUITY.md +++ b/CONTINUITY.md @@ -44,6 +44,38 @@ reference is [CLAUDE.md](CLAUDE.md); the phase plan is [ROADMAP.md](ROADMAP.md). or buy anything without showing Marc the exact item + price first. IPv6 is disabled on CloudFront on purpose (AAAA-only resolver answers broke the fresh domain on IPv6-less networks); Tailscale MagicDNS on Marc's Mac negative-cached the name for an hour. +3b. **Rename — one planned pass once Marc picks a name** (2026-09-26: "naming is all over the + place: earthdeck / Earth Watch / vitalearth.io"). Checklist: npm package + bin + repo + name; `src/site.config.ts` (name, fullName, organization, baseUrl); ledger predicate + `https://earthdeck.dev/finding-event/v1` (keep v1 URL for old entries, add v2 or a + `$schema` alias — do NOT rewrite history); CloudFormation stack/bucket/function names + (new stack + migrate state, or keep internal names); domain (registration only after + trademark check + Marc's explicit OK on the exact name + price); README/CLAUDE/VISION; + `checkpoint` signer name stays "earthdeck" unless the key is rotated. Do it in one PR. +2b. **Scale-out state (2026-09-26 late)**: `earthdeck discover` generates 549 AOIs + (`watchlists/generated/`, 19 API calls, 53 s; re-run every ~14 days — doctor warns when + stale). Runner sweeps `all-generated` in 8 shards per 6-h window (13.5-min budget each), + analyst +1:20, export +1:30, hand-written lists +1:40; per-day caps: CDSE 40, GFW 400, + FIRMS 3000, analyst 10 cases / $3. **Measured** (shard 0/8 dry run on Lambda): 82 pairs, + 47 done in budget, 39 candidates, 13 optical confirmations, Copernicus 32 / GFW 69 / + FIRMS 86 calls. Confirm-only providers (Copernicus for forest_loss) *defer* confirmation + when spent — detection always runs. TODO: measure Copernicus PU per `eo_compare`/S5P + call (free tier 10k PU/month) and set the cap from data. Name: **TerraKeep**, slogan + "Keeping Earth within its limits." — package/repo/stack rename still pending (3b). +3c. **Queued by Marc 2026-09-26 (in this order, one at a time — "take it slowly")**: + 1. **Backtest harness** — `earthdeck backtest --event `: replay rules with the clock + set to a past date for 8–10 documented events (2019 Amazon fires, 2020 Black Summer, + 2023 Canada, 2023 Maui, Rumaila flaring 2024, São Félix 2025 loss, Permian methane + super-emitters, a known false alarm…); report detected / confirmed / lag; publish a + "would we have caught it" page. Data limits: GFW alerts ≥ 2015, VIIRS ≥ 2012. + 2. **Coral bleaching rule** — NOAA CRW DHW crossing alert levels at a reef watchlist + (tool `coral_bleaching` exists); second signal: SST anomaly persistence / neighbour cell. + 3. **Extreme-fire rule** — global VIIRS FRP/extent anomaly vs. the same weeks in prior + years (not only inside protected areas); confirm with a later pass + burn index. + 4. **Radiation** — `radiation` tool + `radiation_anomaly` rule from open ground networks: + BfS ODL (DE, open JSON), EURDEP (EU), EPA RadNet (US), Safecast (global, CC0); dose + rate vs. station baseline, confirmed by a neighbouring station or second network. + Add to TRUST.md blind spots meanwhile: satellites cannot see radiation. 4. **Next build steps**: (a) attribution onto cases in `created.context` (`protected_areas` + `emitters`); (b) `emitters` as the methane confirmer while EMIT is stale; (c) `ledger verify --remote ` (the case pages already print it); (d) GEE: Marc creates the GCP diff --git a/README.md b/README.md index 22eb507..7673fa8 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,34 @@ decides: `ledger_advance` publishes when the gates hold (it computes `gates` via a `publish | hold | reject` verdict; naming a party still needs tier ≥ 2, two distinct reviewer identities and the private-notice clock. `earthdeck doctor` has a **Watch** section (ledger verify, each rule's keys, watchlists, -last sweep heartbeat). +generated watchlists and their age, last sweep heartbeat). + +**Discovery: watchlists from data** — `earthdeck discover --out watchlists/generated +[--max-per-list N] [--only a,b] [--budget 200]` (`src/watch/discover/`) writes five +watchlists plus `_summary.json` (counts, sources, dataset versions, request count). One +run is ~19 requests and under a minute (no CDSE, no FIRMS); it needs `GFW_API_KEY`. + +| File | Source (open data) | Default N | What becomes an AOI | Rules | +| --- | --- | --- | --- | --- | +| `forest-hotspots.json` | GFW `gadm__integrated_alerts__adm2_daily_alerts` (high+ confidence, primary forest, last 30 days) + GADM 4.1 boxes | 150 districts | GADM level-2 box, tiled to ≤ 4 deg² / ≤ 2° a side (`---`) | `forest_loss`, `minHa = max(25, ⌈100 ha/deg² × tile⌉)`, `minAlerts = 10 × minHa`, 90 d | +| `flaring-fields.json` | EOG VIIRS Nightfire annual flare sites (~14k) | 60 fields | sites chained within 15 km, box + 10 km, ≤ 25 deg² | `flaring`, 30 d, `minNights` 5 | +| `methane-basins.json` | Climate TRACE v7 oil & gas CH₄ (production, refining, transport) | 40 basins | sources chained within 50 km, box + ~0.5°, ≤ 2° a side | `methane_anomaly` (defaults) | +| `protected-fires.json` | WDPA via GFW (IDs/stats only) + GFW alerts per protected area | 80 areas | tropical areas > 2,000 km² with primary forest, IUCN Ia–IV first, tiled ≤ 4 deg² | `fires_in_protected` + `forest_loss` (60 d, `minHa = max(5, ⌈40 ha/deg² × tile⌉)`), cooldown 14 d | +| `controls-generated.json` | Intact Forest Landscapes 2020 via GFW | 20 cores | ≤ 0.5° box on each IFL's deepest interior point (maximum inscribed circle), clear of hotspot tiles | `controls.json` thresholds, `control: true` | + +Why the thresholds look like that: a São Félix-level frontier runs ≈ 930 ha/deg² per 90 days +and the control cores' noise is ≈ 60–76 ha/deg² — `100 ha/deg²` is the controls' 25 ha / +0.25 deg² floor scaled to the tile, so the bar depends only on geometry and does not move +between runs. Ids come from dataset ids (GADM, VNF site position, Climate TRACE source id, +WDPA site id, IFL id), so watermarks and cooldowns persist across re-runs; output is +byte-identical for the same data. Choices and their costs: the forest ranking counts only +primary-forest alerts (otherwise Sahel dryland alerts top the list; secondary forest and +cerrado frontiers rank lower); `protected-or-indigenous` marks districts with ≥ 25 % of +their alerts in IUCN Ia/Ib/II areas or LandMark lands; Climate TRACE places basin-level +estimates at a basin centroid, so a methane box is a window around that point; national +"OtherBasins" residuals and offshore basins are dropped. Sweep with +`earthdeck watch --once --watchlist watchlists/generated` (`--max` caps pairs; lists are in +rank order). Re-run weekly — `doctor` flags output older than 14 days. **Analyst (autonomous publishing)** — `src/analyst/`: `earthdeck analyst --once` takes confirmed findings (newest first, `--max` default 5) through three steps, each journaled diff --git a/infra/README.md b/infra/README.md index 330dcee..34280a8 100644 --- a/infra/README.md +++ b/infra/README.md @@ -5,8 +5,8 @@ runs the scheduled watch sweeps on Lambda, keeps the signed findings ledger in S serves the static Earth Watch site at `https://earthdeck.marcsperzel.com/`. ``` - EventBridge Scheduler (UTC, every 6 h, staggered) - :00 amazon :10 congo-borneo :20 controls :30 methane :40 flaring :50 analyst +1h export + EventBridge Scheduler (UTC, every 6 h from 00/06/12/18, staggered) + +0:00…+1:10 generated shards 0–7 +1:20 analyst +1:30 export +1:40 hand-written lists │ async invoke, JSON payload ▼ SSM /earthdeck/* ──► Lambda "earthdeck" (Node 22, arm64, 900 s, 1 GB, concurrency 1) @@ -73,9 +73,26 @@ touched. Pause/resume all schedules: `EARTHDECK_SCHEDULES=DISABLED|ENABLED scrip ## How a run works -Payload: `{ "job": "sweep"|"analyst"|"export"|"all", "watchlist"?: "amazon"|"congo-borneo"|"controls"|"methane"|"flaring", "dryRun"?: true }` -(`watchlist`/`dryRun` only with `sweep`; `all` = five sweeps + analyst + export, manual use — -it may not fit in 900 s). +Payload: `{ "job": "sweep"|"analyst"|"export"|"all", "watchlist"?: W, "shard"?: "i/n", "timeBudgetSec"?: N, "dryRun"?: true }` +where `W` is a hand-written list (`amazon`|`congo-borneo`|`controls`|`methane`|`flaring` → +`watchlists/.json`), `all-handwritten` (those five), `all-generated` (every file in +`watchlists/generated/`) or `generated/` (`watchlists/generated/.json`). +`watchlist`/`shard`/`timeBudgetSec`/`dryRun` only with `sweep`; no `watchlist` = every +top-level `watchlists/*.json`. `all` = five hand-written sweeps + analyst + export, manual use — +it may not fit in 900 s. + +- **Every sweep in Lambda is time-budgeted**: the runner passes + `--time-budget` = remaining invocation time − 90 s (or `timeBudgetSec`, whichever is smaller) + to `node dist/cli.js watch --once`. The kernel stops opening new pairs when one more pair (as + slow as the slowest so far) would overrun, finishes the current one, writes watermarks / + journal / ledger as usual and exits 0 with `budget exhausted: k of n pairs done`. As a + backstop the child is SIGTERMed at remaining − 60 s, leaving the rest for verify + upload. +- **Shards**: `--shard i/n` keeps only pairs with `sha256(aoi.id, rule) mod n == i` — disjoint, + deterministic, independent of file order. Within a sweep, pairs run **least-recently-swept + first** (never-swept first of all, by watermark), so a budget- or quota-cut sweep resumes + where the last one left off and nothing starves. +- **Quotas** (below): pairs whose provider's daily cap is spent are `skipped` with reason + `quota:` (journaled, watermark untouched). - The ledger working copy is `ledger/` in the state bucket minus `ledger/checkpoints/` (the archive) and `ledger.key` (never stored). It is downloaded fresh every run. @@ -99,18 +116,77 @@ The AWS SDK v3 is **not** in the zip: the Lambda Node.js 22 runtime ships it. Th `@aws-sdk/client-*` packages are exact-pinned devDependencies for typechecking only; the runner loads them lazily (`import()`, falling back to `require` via `NODE_PATH`). +## Schedule + +Every 6 hours, windows starting 00:00 / 06:00 / 12:00 / 18:00 UTC (11 schedules, all behind +`SchedulesState`): + +| Offset | Schedule | Payload | +| --- | --- | --- | +| +0:00 | `earthdeck-sweep-shard-0` | `{"job":"sweep","watchlist":"all-generated","shard":"0/8"}` | +| +0:10 … +1:10 | `earthdeck-sweep-shard-1` … `-7` (every 10 min) | same, `shard` `1/8` … `7/8` | +| +1:20 | `earthdeck-analyst` | `{"job":"analyst"}` | +| +1:30 | `earthdeck-export` | `{"job":"export"}` | +| +1:40 | `earthdeck-sweep-handwritten` | `{"job":"sweep","watchlist":"all-handwritten"}` | + +- ~350 generated AOIs / 8 shards ≈ 44 pairs per shard; at 1.5 s politeness delay + a few + seconds of API time per pair that is ~5–8 min, inside the ~13 min budget. A shard that runs + long is cut by its budget and resumes least-recently-swept first next window. +- Slots are 10 min apart but a run may take up to 15: with concurrency 1 an overlapping + invocation is throttled and Lambda's async queue retries it (event age ≤ 6 h), so the chain + drifts later instead of dropping a run. Only one writer ever touches the ledger. +- The hand-written lists run after the export, so their findings are narrated/published in + the next window (≤ 6 h later). +- 44 invocations/day; the 14 h no-success alarm is unchanged. + +## Quotas + +Per-UTC-day caps, counted in the ledger's `watch/quota.json` (synced with the ledger, so they +hold across invocations) and set as function env vars in the template: + +| Env var | Default | Counts | +| --- | --- | --- | +| `EARTHDECK_MAX_CDSE_CALLS` | 60 | `eo_compare`, `methane_plumes`, `eo_*` tool calls (1 each) | +| `EARTHDECK_MAX_GFW_CALLS` | 400 | `forest_alerts` calls (1 each) | +| `EARTHDECK_MAX_FIRMS_CALLS` | 300 | FIRMS transactions: `fires_in` 1; `flaring` ⌈days/5⌉ × sources (30 d × 2 = 12) | +| `EARTHDECK_MAX_ANALYST_CASES` | 10 | findings the analyst takes on per day (also the `--max` default) | +| `EARTHDECK_MAX_ANALYST_USD` | 3 | analyst API spend per day; journaled as `analyst_spend` | + +A pair is skipped `quota:` when any provider its rule needs (from the rule's +`requires`) is spent — note `forest_loss` needs CDSE (for its NDVI confirmation), so it stops +when CDSE does. A call that would cross a cap mid-pair is refused (skip, not gap). An HTTP 429, +a 403 whose body says quota/limit, or FIRMS's "transaction limit" text marks that provider +exhausted for the rest of the run. + +Expected demand for ~350 AOIs (assumed mix — one rule each: 170 `forest_loss`, 90 +`fires_in_protected`, 45 `flaring`, 45 `methane_anomaly`; recompute when the generated lists +land): + +| Provider | Per pair | Per full pass | Per day (4 passes) | Daily cap | Effective revisit under the cap | Provider's own limit | +| --- | --- | --- | --- | --- | --- | --- | +| GFW | forest 2 | 340 | 1,360 | 400 | forest pairs ~1.2×/day | rate-limited per key (UNCONFIRMED figure) | +| CDSE | forest 0–1 (confirm only; ~10% → 17), methane 1 | ~62 (45–215) | ~250 (180–860) | 60 | methane ~1×/day; forest capped with it | processing units / requests per month (UNCONFIRMED figure) | +| FIRMS | fires 2 (1 when quiet), flaring ~12 | 720 (180 + 540) | 2,880 | 300 | FIRMS pairs ~every 2.4 days | 5,000 transactions / 10 min per map key | +| Anthropic | ≈ $0.10 per case (narrate + review) | — | ≤ 10 cases | $3 | — | — | + +The caps, not Lambda time, set the revisit rate. FIRMS's own limit is per 10 minutes, so +`EARTHDECK_MAX_FIRMS_CALLS` can be raised (≈ 3,000 covers four full passes; one shard spends +~90) without risk; raising CDSE needs the account's monthly PU budget checked first. Caps +reset at 00:00 UTC, so the 00:00 window's shards spend them first; later windows sweep what +is left, least-recently-swept first within each shard. + ## Monthly cost (estimate) | Item | Usage | ≈ USD/month | | --- | --- | --- | -| Lambda (arm64, 1 GB) | 28 invocations/day ≈ 840/month; at ~3 min avg ≈ 150k GB-s (worst case 900 s each ≈ 760k GB-s) | 0 within the 400k GB-s free tier; ≤ 5 worst case | +| Lambda (arm64, 1 GB) | 44 invocations/day ≈ 1,320/month; shards ~8 min, others ~2 min ≈ 500k GB-s (worst case 900 s each ≈ 1.19M GB-s) | ~1.5 over the 400k GB-s free tier; ≤ 11 worst case | | S3 (3 buckets, versioned state) | tens of MB, a few thousand PUT/GET | < 0.20 | | CloudFront | low traffic; 1 TB + 10M requests/month always-free; ~120 `/*` invalidations (1,000 free) | ~0 | | Route 53 | existing zone (already paid); alias queries free | 0 extra | | SSM + KMS | standard parameters free; `aws/ssm` key free; ~5k decrypts | < 0.05 | | CloudWatch | 1 custom metric 0.30 + 1 alarm 0.10 + small log ingest (30-day retention) | ~0.50 | | EventBridge Scheduler, ACM, SNS email | well inside free tiers | 0 | -| **Total** | | **~1–3** (Anthropic API usage by the analyst is separate) | +| **Total** | | **~2–5** (analyst Anthropic spend is separate, capped at $3/day ≈ $90/month) | ## Key rotation @@ -160,5 +236,9 @@ CFN cannot create a bucket whose name already exists. and `s3://earthdeck-state-185692190330/state/heartbeat.json` for the last success. - **Site shows the placeholder** — the export job is `unavailable` in this build or hasn't run yet; `scripts/run-job.sh export`. -- **Sweeps time out at 900 s** — split a watchlist, or lower per-call delay (`--delay-ms`); - watermarks mean a killed sweep resumes next slot (its unverified writes are not uploaded). +- **Sweeps time out at 900 s** — should not happen (every Lambda sweep is time-budgeted); if + one does, a single call hung past the budget. Watermarks mean a killed sweep resumes next + slot. `budget exhausted: k of n pairs done` in the log is normal, not an error. +- **Many `quota:` skips** — the daily cap is spent (see Quotas); check + `ledger/watch/quota.json` in the state bucket, raise the env var in the template if the + provider allows it. diff --git a/infra/earthdeck.yaml b/infra/earthdeck.yaml index 7a69147..54375cb 100644 --- a/infra/earthdeck.yaml +++ b/infra/earthdeck.yaml @@ -36,7 +36,8 @@ Conditions: WithFunction: !Equals [!Ref DeployFunction, "true"] Mappings: - # Schedules: 6-hour slots at 00/06/12/18 UTC — sweeps at :00 :10 :20 :30 :40, analyst :50, export +1 h. + # Schedules: 6-hour windows from 00/06/12/18 UTC — generated-list shards 0–7 at +0:00…+1:10 + # (every 10 min), analyst +1:20, export +1:30, hand-written lists +1:40. See infra/README.md. Const: CloudFront: HostedZoneId: Z2FDTNDATAQYW2 # fixed zone id for every CloudFront alias target @@ -377,6 +378,12 @@ Resources: EARTHDECK_SSM_PREFIX: /earthdeck EARTHDECK_SITE_URL: !Sub "https://${DomainName}" # No EARTHDECK_CONTACT: the public site is anonymous — no personal email is ever exported. + # Per-UTC-day caps (counted in ledger/watch/quota.json); see infra/README.md "Quotas". + EARTHDECK_MAX_CDSE_CALLS: "40" + EARTHDECK_MAX_GFW_CALLS: "400" + EARTHDECK_MAX_FIRMS_CALLS: "3000" + EARTHDECK_MAX_ANALYST_CASES: "10" + EARTHDECK_MAX_ANALYST_USD: "3" NODE_OPTIONS: --enable-source-maps Tags: [{ Key: Project, Value: earthdeck }] @@ -422,11 +429,13 @@ Resources: Name: earthdeck Tags: [{ Key: Project, Value: earthdeck }] - SweepAmazon: + # Generated watchlists: 8 disjoint shards (hash(aoi.id, rule) mod 8), one every 10 min from +0:00. + # Each gets --time-budget = remaining Lambda time − 90 s; a cut shard resumes least-recently-swept first. + SweepShard0: Type: AWS::Scheduler::Schedule Condition: WithFunction Properties: - Name: earthdeck-sweep-amazon + Name: earthdeck-sweep-shard-0 GroupName: !Ref ScheduleGroup State: !Ref SchedulesState ScheduleExpression: cron(0 0/6 * * ? *) @@ -435,14 +444,14 @@ Resources: Target: Arn: !GetAtt RunnerFunction.Arn RoleArn: !GetAtt SchedulerRole.Arn - Input: '{"job":"sweep","watchlist":"amazon"}' + Input: '{"job":"sweep","watchlist":"all-generated","shard":"0/8"}' RetryPolicy: { MaximumRetryAttempts: 2, MaximumEventAgeInSeconds: 3600 } - SweepCongoBorneo: + SweepShard1: Type: AWS::Scheduler::Schedule Condition: WithFunction Properties: - Name: earthdeck-sweep-congo-borneo + Name: earthdeck-sweep-shard-1 GroupName: !Ref ScheduleGroup State: !Ref SchedulesState ScheduleExpression: cron(10 0/6 * * ? *) @@ -451,14 +460,14 @@ Resources: Target: Arn: !GetAtt RunnerFunction.Arn RoleArn: !GetAtt SchedulerRole.Arn - Input: '{"job":"sweep","watchlist":"congo-borneo"}' + Input: '{"job":"sweep","watchlist":"all-generated","shard":"1/8"}' RetryPolicy: { MaximumRetryAttempts: 2, MaximumEventAgeInSeconds: 3600 } - SweepControls: + SweepShard2: Type: AWS::Scheduler::Schedule Condition: WithFunction Properties: - Name: earthdeck-sweep-controls + Name: earthdeck-sweep-shard-2 GroupName: !Ref ScheduleGroup State: !Ref SchedulesState ScheduleExpression: cron(20 0/6 * * ? *) @@ -467,14 +476,14 @@ Resources: Target: Arn: !GetAtt RunnerFunction.Arn RoleArn: !GetAtt SchedulerRole.Arn - Input: '{"job":"sweep","watchlist":"controls"}' + Input: '{"job":"sweep","watchlist":"all-generated","shard":"2/8"}' RetryPolicy: { MaximumRetryAttempts: 2, MaximumEventAgeInSeconds: 3600 } - SweepMethane: + SweepShard3: Type: AWS::Scheduler::Schedule Condition: WithFunction Properties: - Name: earthdeck-sweep-methane + Name: earthdeck-sweep-shard-3 GroupName: !Ref ScheduleGroup State: !Ref SchedulesState ScheduleExpression: cron(30 0/6 * * ? *) @@ -483,14 +492,14 @@ Resources: Target: Arn: !GetAtt RunnerFunction.Arn RoleArn: !GetAtt SchedulerRole.Arn - Input: '{"job":"sweep","watchlist":"methane"}' + Input: '{"job":"sweep","watchlist":"all-generated","shard":"3/8"}' RetryPolicy: { MaximumRetryAttempts: 2, MaximumEventAgeInSeconds: 3600 } - SweepFlaring: + SweepShard4: Type: AWS::Scheduler::Schedule Condition: WithFunction Properties: - Name: earthdeck-sweep-flaring + Name: earthdeck-sweep-shard-4 GroupName: !Ref ScheduleGroup State: !Ref SchedulesState ScheduleExpression: cron(40 0/6 * * ? *) @@ -499,7 +508,55 @@ Resources: Target: Arn: !GetAtt RunnerFunction.Arn RoleArn: !GetAtt SchedulerRole.Arn - Input: '{"job":"sweep","watchlist":"flaring"}' + Input: '{"job":"sweep","watchlist":"all-generated","shard":"4/8"}' + RetryPolicy: { MaximumRetryAttempts: 2, MaximumEventAgeInSeconds: 3600 } + + SweepShard5: + Type: AWS::Scheduler::Schedule + Condition: WithFunction + Properties: + Name: earthdeck-sweep-shard-5 + GroupName: !Ref ScheduleGroup + State: !Ref SchedulesState + ScheduleExpression: cron(50 0/6 * * ? *) + ScheduleExpressionTimezone: UTC + FlexibleTimeWindow: { Mode: "OFF" } + Target: + Arn: !GetAtt RunnerFunction.Arn + RoleArn: !GetAtt SchedulerRole.Arn + Input: '{"job":"sweep","watchlist":"all-generated","shard":"5/8"}' + RetryPolicy: { MaximumRetryAttempts: 2, MaximumEventAgeInSeconds: 3600 } + + SweepShard6: + Type: AWS::Scheduler::Schedule + Condition: WithFunction + Properties: + Name: earthdeck-sweep-shard-6 + GroupName: !Ref ScheduleGroup + State: !Ref SchedulesState + ScheduleExpression: cron(0 1/6 * * ? *) + ScheduleExpressionTimezone: UTC + FlexibleTimeWindow: { Mode: "OFF" } + Target: + Arn: !GetAtt RunnerFunction.Arn + RoleArn: !GetAtt SchedulerRole.Arn + Input: '{"job":"sweep","watchlist":"all-generated","shard":"6/8"}' + RetryPolicy: { MaximumRetryAttempts: 2, MaximumEventAgeInSeconds: 3600 } + + SweepShard7: + Type: AWS::Scheduler::Schedule + Condition: WithFunction + Properties: + Name: earthdeck-sweep-shard-7 + GroupName: !Ref ScheduleGroup + State: !Ref SchedulesState + ScheduleExpression: cron(10 1/6 * * ? *) + ScheduleExpressionTimezone: UTC + FlexibleTimeWindow: { Mode: "OFF" } + Target: + Arn: !GetAtt RunnerFunction.Arn + RoleArn: !GetAtt SchedulerRole.Arn + Input: '{"job":"sweep","watchlist":"all-generated","shard":"7/8"}' RetryPolicy: { MaximumRetryAttempts: 2, MaximumEventAgeInSeconds: 3600 } Analyst: @@ -509,7 +566,7 @@ Resources: Name: earthdeck-analyst GroupName: !Ref ScheduleGroup State: !Ref SchedulesState - ScheduleExpression: cron(50 0/6 * * ? *) + ScheduleExpression: cron(20 1/6 * * ? *) ScheduleExpressionTimezone: UTC FlexibleTimeWindow: { Mode: "OFF" } Target: @@ -525,7 +582,7 @@ Resources: Name: earthdeck-export GroupName: !Ref ScheduleGroup State: !Ref SchedulesState - ScheduleExpression: cron(0 1/6 * * ? *) + ScheduleExpression: cron(30 1/6 * * ? *) ScheduleExpressionTimezone: UTC FlexibleTimeWindow: { Mode: "OFF" } Target: @@ -534,6 +591,23 @@ Resources: Input: '{"job":"export"}' RetryPolicy: { MaximumRetryAttempts: 2, MaximumEventAgeInSeconds: 3600 } + # The five hand-written watchlists in one invocation (after the export; published next window). + SweepHandwritten: + Type: AWS::Scheduler::Schedule + Condition: WithFunction + Properties: + Name: earthdeck-sweep-handwritten + GroupName: !Ref ScheduleGroup + State: !Ref SchedulesState + ScheduleExpression: cron(40 1/6 * * ? *) + ScheduleExpressionTimezone: UTC + FlexibleTimeWindow: { Mode: "OFF" } + Target: + Arn: !GetAtt RunnerFunction.Arn + RoleArn: !GetAtt SchedulerRole.Arn + Input: '{"job":"sweep","watchlist":"all-handwritten"}' + RetryPolicy: { MaximumRetryAttempts: 2, MaximumEventAgeInSeconds: 3600 } + # ── watchdog ────────────────────────────────────────────────────────────────────────── AlertTopic: Type: AWS::SNS::Topic diff --git a/infra/placeholder/index.html b/infra/placeholder/index.html index e9d9f5b..85c45ad 100644 --- a/infra/placeholder/index.html +++ b/infra/placeholder/index.html @@ -3,7 +3,7 @@ -Earth Watch +TerraKeep