Skip to content

Smeldr v1.192.0: additions to existing reads

Choose a tag to compare

@xxwink xxwink released this 13 Nov 15:35
· 55 commits to main since this release

[1.192.0] - 2026-11-13

Added

  • SignalHistory and SignalKindOf classify every signal type (T1183). SignalHistory is a new SignalKind constant next to SignalCondition and SignalRequest. SignalKindOf(t string) SignalKind returns the catalog kind of a signal type, or SignalHistory for a type that is not in the catalog. It follows SignalTypeOf, so the two never disagree.
  • PlaceApprover.IsCaller and InstanceAdministrator.IsCaller say whether a holder is the caller (T1183). Both are JSON is_caller fields, set by App.ApproversOf and App.Administrators. A holder is the caller when it is the caller's own identity (D165), so the flag is true whichever of the identity's live tokens made the call.
  • App.RestCountsWith adds the ratified split, a caller's limit and a page of addresses (T1183). RestCounts now calls it with zero options, and its answer is unchanged. RestCountsDetail adds RestsOnThisDetail and ThisRestsOnDetail, each with a ratified count and the page of addresses RestCountOptions asks for; RestCount itself is unchanged, so it stays a comparable value. Out-of-range options return ErrBadRequest with problem rest_counts.limit_invalid. The sweep stores a nullable ratified_count column in smeldr_rest_counts, added by EnsureRestCountTable, and StoredRestCounts.Ratified.Known stays false until a sweep fills it.
  • SearchQuery.Narrow and SearchQuery.After search by address and external reference (T1183). A narrow search matches only the record's address and its external_ref, from one character, and never reads a text field. SearchQuery.After continues it from a previous SearchResult.Next, and each hit carries ExternalRef and MatchReason. Each search reads at most 201 rows per type and phase (SearchNarrowCountCeiling is 200, D183), and above that SearchResult.AtLeast is set. A reference matches case-insensitively for ASCII letters, and references are ordered in byte order on both databases. New indexes on every addressed table: idx_<table>_address_no, and idx_<table>_narrow_ref on the reference key and the id (under the C collation on PostgreSQL, whatever the database's own collation).
  • App.PremiseFlags lists the premise-flagged pairs of a resting Decision (D149, T1183). It returns PremiseFlag values, each saying whether a condition is open (ConditionOpen), the condition's address (only when the caller may read that Signal), the premise (only when the caller may read it), and the last confirm_premise. An unknown or unreadable Decision returns ErrNotFound, and an empty decision returns ErrBadRequest with problem premise.decision_required. Capability item premise_flags.
  • LatestSweepRuns returns the newest sweep run of each detector (T1183). It is a package function, not a method on SweepRunStore, and it returns the records sorted by detector, with skipped and err set. A database with no sweep table returns an empty list, and a failed read returns ErrInternal. The new index idx_smeldr_sweep_runs_latest on (detector, ran_at, id) serves it, so the read follows the number of detectors, not the number of runs.