Skip to content

feat: fast assessment handlers + perf logging + Julia 1.12 + deps - #12

Merged
ConnectedSystems merged 4 commits into
mainfrom
improvements
Aug 2, 2026
Merged

feat: fast assessment handlers + perf logging + Julia 1.12 + deps#12
ConnectedSystems merged 4 commits into
mainfrom
improvements

Conversation

@ConnectedSystems

Copy link
Copy Markdown
Collaborator

Adds fast-preview job handlers and operational improvements on top of the Julia 1.12 / sysimage work already on origin/improvements.

Requires open-AIMS/ReefGuide.jl to be tagged v0.3.0 before this PR's CI passes.

What's included:

  • feat: FAST_REGIONAL_ASSESSMENT and FAST_SUITABILITY_ASSESSMENT job handlers
  • fix: guard against empty bbox scope — fail fast with a clear error message when the requested area contains no reef data, rather than crashing inside assess_region_quality
  • chore: inject _perf dict (time_taken_s, peak_rss_mb) into job result payload for dev-console performance logging
  • chore: bump ReefGuide compat to 0.3.0; update deps (Manifest.toml, Project.toml); add using Dates

ConnectedSystems and others added 4 commits August 1, 2026 18:55
Adds the two new fast/preview job types from
.claude/plans/2026-07-31_slow_fast_assessment_feature.md Phase 2:

- FastRegionalAssessmentInput/FastSuitabilityAssessmentInput structs
  (handlers.jl), mirroring RegionalAssessmentInput/SuitabilityAssessmentInput
  plus a `scope` field. `scope` mirrors the TS `spatialScopeSchema`
  discriminated union (bbox | polygon) via a SpatialScopeInput abstract type
  with JSON3.StructTypes tag-dispatch on the `type` field.
- handle_job(::FastRegionalAssessmentHandler, ...)/
  handle_job(::FastSuitabilityAssessmentHandler, ...), which load region data
  narrowed to the request's scope via a new prepare_fast_target_regional_data
  (regions_criteria_setup.jl) that deliberately bypasses the shared
  REGIONAL_DATA in-memory cache, so a scoped/narrowed load can never pollute
  or be confused with a full-region cache entry.
- fast_regional_assessment_params_hash/fast_suitability_assessment_params_hash
  (handler_helpers.jl), sibling hash functions to the existing
  regional_assessment_params_hash/suitability_assessment_params_hash that
  fold `scope` into the cache key, so two different viewports/polygons can't
  collide in the on-disk cache.
- FAST_REGIONAL_ASSESSMENT/FAST_SUITABILITY_ASSESSMENT added to the JobType
  enum and registered in __init__; worker.jl's handler-registration loops
  already iterate `instances(JobType)`, so no separate dispatch table needed.

Known gap: ReefGuide.jl's SpatialScope/BBoxScope/PolygonScope/scope-aware
load_target_region are new in an unreleased ReefGuide.jl (Project.toml compat
already bumped to 0.2.0, but Manifest.toml is still pinned to the last
registered 0.1.12 pending registration). Function signatures that would
reference `ReefGuide.SpatialScope` are deliberately left untyped rather than
annotated, since a type annotation is evaluated at method-definition time and
would break precompilation against the currently-pinned dependency; calling
build_spatial_scope at runtime currently throws UndefVarError, documented by
a test. This needs a ReefGuide.jl release + Manifest.toml re-resolve before
the fast handlers can run end-to-end.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ConnectedSystems
ConnectedSystems merged commit 7f0807f into main Aug 2, 2026
1 check passed
@ConnectedSystems
ConnectedSystems deleted the improvements branch August 2, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant