Skip to content

v0.1.0

Latest

Choose a tag to compare

@rsdoiel rsdoiel released this 28 Sep 21:14
· 4 commits to main since this release
  • An alert system for cold (#111, DR-0028): a stale RDM/CaltechTHESIS harvest now surfaces as a dashboard alert instead of going unnoticed. "An alert is a report" -- cold_reports.yaml's alert_rdm_harvest_stale and alert_caltechthesis_harvest_stale stanzas run the same generic run_alert_watermark_stale.bash, discovered by check_alerts.bash scanning for the alert_ key prefix rather than one hardcoded check per instance. The artifact's existence is the whole state machine: no alerts.ds, no ok/firing flags. check_alerts.bash reconciles watermark staleness against artifact existence (stale+no-artifact enqueues, fresh+artifact clears), installed hourly during business hours via crontab-example. Runnable/Runner gained optional watermark/threshold_minutes/label fields and an envOverrides path so a report script can read its alert parameters from the environment; send_mail.ts was rewritten for bsd-mailx and fixed four real bugs along the way (unquoted subject interpolation, recipients as separate arguments, .noThrow() replacing a truthy-object check that reported failure on every successful send, shared email validation via a new splitAndValidateEmails helper). The dashboard element (cold_alerts.ts) is a single fetch of /api/reports.ds/report_list on load, no polling, built to the design brief's A11y requirements (role="status" aria-live="polite" already present in the markup before content lands, collapsed one-line summary, real dismissal, nothing calls .focus()). Two decisions changed after live use: no client-side dismiss control (clearing an alert is SSH-gated, so a librarian-facing dismiss button was backwards) and the alert box now uses site.css's existing black-on-yellow .announcement treatment. Real recipient emails are deliberately left empty on both stanzas pending the next developer meeting; monitoring until then is via the dashboard.
  • Fix #83: a repeatable alt_name field for funders and people, stored as a real JSON array via csv.parse() on save (the pattern funders.ts already used for acronyms/grant_numbers), not the raw-text-block scheme groups.alternative had. Purely additive to both collections.
  • Fix #115: groups.alternative was never parsed on save (handlePostGroups didn't run it through csv.parse(), unlike handlePostFunders), so any group with more than one alt name -- or none -- ended up with a raw multi-line string instead of an array, silently breaking the json_each()-based alt-name lookup behind the group-name autocomplete (cold_api.yaml's lookup_name/lookup_name_or_clgid). Fixed to match handlePostFunders's pattern; group.hbs's display updated to iterate the array (one name per line) so group_view.ts's client-side bulleted-list rendering keeps working. Migrated groups.ds in production: 82 of 110 records converted from string to array (not just the ones with actual multiple names -- includes empty-string records normalizing to []); verified live that the display page and the previously-broken alt-name autocomplete query both work correctly afterward.
  • Fix #117: journal_edit.hbs's csv-textarea posted to "alternative_names", but journals.ts stored it under "alternate_names" -- the read path never saw what the write path saved. Standardized on alt_name across journals.ts, journal_edit.ts/journal_edit_test.ts, and both journal views, matching the convention funders.alt_name/people.alt_name already established. Migrated journals.ds in production: 4812 of 4813 records renamed from alternate_names/alternative_names to alt_name.
  • #116 (survey of other multi-valued fields still stored as raw text) closed as nothing currently actionable: funders.acronyms/alt_name/grant_numbers and people.alt_name already save correctly as arrays, but have zero populated records in either local or production data, so there is nothing to migrate today. Revisit if that changes.
  • Fix #53: a "search ORCID" link on the people edit page, opening ORCID's public search pre-filled with the person's name, kept in sync client-side as family_name/given_name change.
  • Fix #42: "view" links next to ORCID/ROR/ArchivesSpace/CaltechAUTHORS/CaltechTHESIS identifier fields on the people edit page, matching the links the display page already had; guarded so an empty field shows no link.
  • Fix #114: the clpid/clgid validator regex excluded digits from every segment, rejecting real production identifiers like COVID-19 and Caltech-Center-for-Sensing-to-Intelligence-(S2I). Re-verified against all 9,217 people.ds and all 110 groups.ds keys: 0 failures either way after the fix.
  • Fix #85: every save handler's redirect Location header was built from the raw identifier, which throws outright for a code point outside Latin-1 (RFC 7230 3.2.6) and sends invalid UTF-8 even for an in-range diacritic. Now percent-encoded before use, decoded back correctly through the existing pathIdentifier()/decodeURI path.
  • Fix #87: renderPage and renderJSON -- used by every list/detail page and /api JSON endpoint -- set no cache header at all, so a browser could serve a stale list after a record changed. Both now send Cache-Control: no-store; static assets via serveDir are unaffected.

Full Changelog: v0.0.55...v0.1.0