pubnub-illuminate: runtime-correctness guidance (decision false positives, ingestion lag, verify loop) - #1
Open
tgreene wants to merge 1 commit into
Open
Conversation
…ositives, ingestion lag, verify) The skill covers how to build each resource well, but under-documents why a syntactically-valid config still behaves wrong at runtime. The most painful gap: a Decision that fires every evaluation window regardless of real activity. - decisions-4-step-workflow.md: new "Avoiding False Positives" section (unfiltered measure metric collapses toward 0; a NUMERIC_LESS_THAN threshold then trips on idle windows — prefer NUMERIC_GREATER_THAN above baseline); two decoder-ring rows; and a note that a PUBNUB_PUBLISH action silently fails to deliver on an invalid/over-nested channel (>3 dot levels). - metrics.md: reframe filtering as a correctness requirement for measure metrics (not just a cost/cardinality tip) + a Common Errors row. - business-objects.md: state that a BO ingests every message type on the channel, so downstream metrics must filter by event type; suggest mapping an event/type discriminator field. - SKILL.md: add the ~20-30s ingestion/aggregation lag to Constraints, a false-positive pointer, and a "verify before declaring success" output step. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
pubnub-illuminateskill is solid on how to build each resource (the Decision 4-step workflow, required-fields-or-500, immutability, cascade-delete, dashboard full-replace PUT are all well covered). The gap is the runtime-correctness layer — why a syntactically valid config still behaves wrong. The most painful instance, hit in real Illuminate work: a Decision that fires on every evaluation window regardless of real activity.Root cause: a single PubNub channel usually carries several message/event types, and a Business Object ingests all of them. An unfiltered measure metric (
AVG/SUM/MIN/MAX) therefore averages across unrelated messages — records lacking the measured field contribute nothing, so the aggregate collapses toward0. ANUMERIC_LESS_THANrule then trips on every idle window (0 < X). This was verified end-to-end against a live keyset: an unfiltered< thresholddecision fired every minute; adding aSTRING_EQUALSevent-type filter to the metric and flipping toNUMERIC_GREATER_THANabove baseline made it fire only on genuine spikes.Changes (docs only)
NUMERIC_GREATER_THANabove baseline (an empty window reads0, which> Xdoes not satisfy).PUBNUB_PUBLISHnote: the target channel must be a valid PubNub channel — an invalid/over-nested channel (a.b.c.d, >3 dot levels) was observed to log as unsuccessful and never deliver.event/type discriminator field.All additions are general (not app-specific) and shape-agnostic — they don't change any documented request JSON.
Notes for maintainers (flagged, not changed)
Two things I couldn't confirm against the raw
admin-api(my hands-on was via themanage_illuminateMCP tool, same backend) and deliberately left untouched:{ fieldId, operation, value }; the backend I exercised used{ sourceType, sourceId, operation, arguments: [...] }. If the documented shape isn't accepted by the versioned API, a copy-pasted filter would be silently ignored (reproducing the very misfire above). Worth a quick verify.decisionIdsalone; I always also setshowDecisions: true. Worth confirmingdecisionIdsalone renders the trigger overlay.