MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestFireDueRemindersIsIdempotentAcrossTicks
TestFireDueRemindersIsIdempotentAcrossTicks: a second tick must not re-fire. MUTANT: dropping `AND fired_at IS NULL` from the fire UPDATE makes the s
internal/store/reminders_test.go:161
FunctionTestFireDueRemindersWritesOutboxEvent
TestFireDueRemindersWritesOutboxEvent pins the pairing the whole design rests on: the fired_at write and the event are one transaction. MUTANT: movin
internal/store/reminders_test.go:102
FunctionTestFireInstant
(t *testing.T)
internal/store/schedules_test.go:817
FunctionTestFireOneReminderArbitratesAStaleCandidate
TestFireOneReminderArbitratesAStaleCandidate drives the arbiter DIRECTLY with an id that a concurrent pass already claimed — the race the public entry
internal/store/reminders_test.go:199
FunctionTestFireOneReminderBlocksOnAnArchivingItem
(t *testing.T)
internal/store/reminders_pg_test.go:99
FunctionTestFireOneReminderBlocksOnAnArchivingWorkspace
(t *testing.T)
internal/store/reminders_pg_test.go:58
FunctionTestFirePathInvariant
TestFirePathInvariant is the pin for the invariant stated on FireDueReminders: the candidate scan proves nothing, and every condition that made a row
internal/store/reminders_test.go:1131
FunctionTestFirePathInvariantFiresWhenNothingChanged
TestFirePathInvariantFiresWhenNothingChanged is the invariant's positive control. Every case above asserts that nothing happens, so all four would pas
internal/store/reminders_test.go:1216
FunctionTestFiredFloatingReminderKeepsOccurrenceAfterZoneChange
A FIRED floating managed row reports the instant it fired for (TASK-4103, replacing the PR2 H-L2 omit fallback): the fire transaction overwrites next_
internal/store/schedule_fire_test.go:937
FunctionTestFiredFloatingRowIsNotRetimedByLeadOrHooks
TASK-4103 C2a: the fire overwrite of next_at, the new managed dedupe key, and the missed count. A floating schedule that fired directly (its early bou
internal/store/schedule_outstanding_test.go:20
FunctionTestFiredReminderOnADoneItemIsFilteredNotAcked
TestFiredReminderOnADoneItemIsFilteredNotAcked is a pin, and the two halves are the whole point: ABSENT from the surface, PRESENT in the table. Acking
internal/server/handlers_reminders_test.go:124
FunctionTestFiredReminderReachesTheSuggestionSurface
TestFiredReminderReachesTheSuggestionSurface — the mandatory poll path. On an instance with no webhook dispatcher (the common self-hosted shape) the o
internal/server/handlers_reminders_test.go:80
FunctionTestFiredReminderSuggestionCarriesItsID
TestFiredReminderSuggestionCarriesItsID. The docs tell an agent to acknowledge what it sees in next/ready, and the payload did not carry the handle:
internal/server/handlers_reminders_test.go:299
FunctionTestFirstDuplicateJSONKey
TestFirstDuplicateJSONKey covers the detector on its own, because the case it exists for is one a decode cannot show you: by the time there is a map,
internal/server/nul_repair_differential_test.go:440
FunctionTestFirstIDOfAnIncarnationIsAboveItsBase
(t *testing.T)
internal/events/idspace_test.go:102
FunctionTestFirstPartyKeyModeIsPinned
TestFirstPartyKeyModeIsPinned covers the other contract gap: the three first-party payloads have fixed projection shapes, so a declaration naming one
internal/server/handlers_collection_traits_test.go:514
FunctionTestFirstWriteMetricEachCallSite
Every call site, through its handler, as the account's first write: the reply route, the attachment upload, and an item create by an agent.
internal/server/task3926_funnel_metrics_test.go:304
FunctionTestFirstWriteMetricKindFromCommentSite
A comment that is the account's first write is counted as kind=comment (the attachment kind is covered by TestRecordFirstWriteGates' control).
internal/server/task3926_funnel_metrics_test.go:137
FunctionTestFirstWriteMetricOnceAndWindow
Through the real handlers: a new account's first item is counted once, under kind=item and client=web; a second item and a comment after it are not fi
internal/server/task3926_funnel_metrics_test.go:93
FunctionTestFirstWriteMetricSkipsWorkspaceRestore
A workspace restore records the write but is not an item write, so as an account's first write it is not counted (TASK-3926 r1).
internal/server/task3926_funnel_metrics_test.go:357
FunctionTestFitStateCutsOnRuneBoundaries
TestFitStateCutsOnRuneBoundaries sweeps the cut OFFSET, which is the whole point: the offset is a function of how large the questions are, so a single
internal/decision/decision_test.go:587
FunctionTestFitStateHoldsTheBudgetAtTheQuoteEdge
With 0 or 1 bytes left for the state, fitState returned "" — which still marshals to two bytes, so the request went over budget. This walks `remaining
internal/decision/review2_test.go:188
FunctionTestFitStateRefusesOversizedQuestionsBeforeSending
TestFitStateRefusesOversizedQuestionsBeforeSending pins ErrRequestTooLarge (TASK-3120): a Choice question set whose options alone exceed maxRequestTok
internal/decision/decision_test.go:334
FunctionTestFitStateWithNoRoomForState
Boundary: when the questions alone consume the budget there is no room for any state, and that must be an error or an empty state — never a panic or a
internal/decision/review_test.go:271
FunctionTestFittedRequestStaysInsideTheBudgetWithALongModelName
The envelope reservation used to be a fixed 512 bytes. A model name longer than that, plus a state cut exactly to the limit, sent a request over the b
internal/decision/review2_test.go:120
FunctionTestFlatJSONBody_OmitsEmptyAndNil
(t *testing.T)
internal/mcp/dispatch_http_routes_test.go:188
FunctionTestFloatingAcrossZoneChange
(t *testing.T)
internal/schedule/floating_test.go:40
FunctionTestFloatingDSTInViewZone
(t *testing.T)
internal/schedule/floating_test.go:53
FunctionTestFloatingFireWithBrokenRuleRecordsTheExactInstant
A floating row whose stored rule no longer compiles still fires into a fired row, and "fired means next_at is exact" holds on that path too: next_at i
internal/store/schedule_fire_test.go:1030
FunctionTestFloatingFollowsViewZone
(t *testing.T)
internal/schedule/floating_test.go:27
FunctionTestFloatingForbidsZone
(t *testing.T)
internal/schedule/floating_test.go:81
FunctionTestFloatingOverrideFireKeepsTheFrozenInstantAfterAZoneChange
A snoozed or moved floating occurrence is frozen at the instant the caller saw (next_at), so a recipient zone change before it re-fires cannot move it
internal/store/schedule_fire_stamp_test.go:36
FunctionTestFloatingRequiresView
(t *testing.T)
internal/schedule/floating_test.go:55
FunctionTestFloatingZUntilRefused
(t *testing.T)
internal/schedule/floating_test.go:88
FunctionTestFoldBulkHeader_KeepsOneSnapshotPerItem
TestFoldBulkHeader_KeepsOneSnapshotPerItem pins the fold's answer to the disjoint-delta rule: one bulk member can write several rows (a move that also
internal/store/event_outbox_test.go:1980
FunctionTestFoldNameMatchesEncodingJSON
(t *testing.T)
internal/jsonscan/jsonscan_test.go:96
FunctionTestForEachTitleLinkMatchesTheRegexOracle
forEachTitleLink claims to be wikiLinkPattern executed by hand, including the skip-to-the-stop step its linearity depends on. This drives it against t
internal/links/bug2806_title_link_scan_test.go:14
FunctionTestForceRefreshDoesNotStallOnInFlightApplier
TestForceRefreshDoesNotStallOnInFlightApplier is a guard: ForceRefreshRoom must NOT wait for an in-flight applier round-trip (the old drain could stal
internal/collab/restore_coord_test.go:442
FunctionTestForceRefreshRoom
TestForceRefreshRoom verifies the server-initiated force-refresh (BUG-2264): it runs the caller's commit, prunes the ENTIRE per-item op-log, and sends
internal/collab/manager_test.go:639
FunctionTestForceRefreshRoomAckLossReconciledReturnsRestoredItem
TestForceRefreshRoomAckLossReconciledReturnsRestoredItem drives the REAL restore tx + REAL reconcile through ForceRefreshRoom with a synthetic ACK los
internal/server/handlers_item_versions_test.go:188
FunctionTestForceRefreshRoomReconcile
TestForceRefreshRoomReconcile covers the Postgres commit-outcome reconciliation (BUG-2276 residual 1): when the restore commit returns an error, the s
internal/collab/manager_test.go:737
FunctionTestForceRefreshRoomUncertainInvalidatesInMemoryFences
TestForceRefreshRoomUncertainInvalidatesInMemoryFences is the BUG-2276 residual-1 guard: on the UNCERTAIN commit-outcome path, ForceRefreshRoom must C
internal/collab/manager_test.go:928
FunctionTestForecastOnDeadlinelessScheduleNeverMisses
A deadline-less schedule with a past forecast is never a candidate.
internal/store/milestone_test.go:155
FunctionTestForecastOnlyGuestItemAOnly
(t *testing.T)
internal/server/handlers_agenda_forecast_test.go:315
FunctionTestForecastOnlyLeavesPagingUnchanged
(t *testing.T)
internal/server/handlers_agenda_forecast_test.go:381
FunctionTestForecastOnlyOAuthAllowList
(t *testing.T)
internal/server/handlers_agenda_forecast_test.go:335
FunctionTestForecastOnlyPinnedWorkspace
(t *testing.T)
internal/server/handlers_agenda_forecast_test.go:361
FunctionTestForecastPassingCreatesNoMiss
RED if a forecast is written into the roles, an override or a reminder: a native deadline schedule with a long-past forecast records no more misses th
internal/store/milestone_test.go:121
FunctionTestForecastSummariesBatch
(t *testing.T)
internal/store/milestone_test.go:561
FunctionTestForecastTwoSettersKeepProvenance
RED if SetForecast overwrites provenance without an event, or the read drops the setter.
internal/store/milestone_test.go:91
FunctionTestFormatAttachmentSize
(t *testing.T)
internal/server/render/attachments_test.go:86
FunctionTestFormatChangeValueNilSafe
(t *testing.T)
internal/server/handlers_documents_test.go:127
FunctionTestFormatChangesForDisplayMatchesTheJSFixture
TestFormatChangesForDisplayMatchesTheJSFixture asserts the corpus the web suite asserts (BUG-2789): the two implementations agree because both agree w
internal/cli/activity_changes_test.go:12
FunctionTestFormatChatLineEnvelopes
(t *testing.T)
cmd/pad/cmd_watch_chat_test.go:98
FunctionTestFormatChatLineQuoteIsReferenceAndExcerpt
TASK-4043: fetched quote previews stay separate from the body budget. Kills: Q-a (omit quote); Q-b (print m.Body as the quote, since the DTO has no bo
cmd/pad/cmd_watch_chat_test.go:143
FunctionTestFormatFieldSummaryKeepsLargeNumbers
A number above 2^53 keeps its digits in the summary too.
internal/cli/bug3448_field_summary_test.go:27
FunctionTestFormatFieldSummarySummarisesStructuredValues
BUG-3448: the one-line field summary (`pad item update`'s echo) printed a json field in Go's map syntax. A structured value now summarises as its size
internal/cli/bug3448_field_summary_test.go:11
FunctionTestFormatFlagValidation
TestFormatFlagValidation covers the root PersistentPreRunE added for BUG-2032: a bogus --format value must fail loudly instead of silently rendering a
cmd/pad/format_flag_test.go:12
FunctionTestFormatForTool
(t *testing.T)
internal/cli/agents_test.go:83
FunctionTestFormatInstantNeverLocal
(t *testing.T)
internal/cli/zone_test.go:8
FunctionTestFormatItemAsMarkdownIgnoresAnUnknownContentState
TestFormatItemAsMarkdownIgnoresAnUnknownContentState pins the other direction of the same key: only the ONE value this vocabulary defines produces a w
internal/mcp/resources_content_state_test.go:92
FunctionTestFormatItemAsMarkdownPrintsJSONFieldsAsJSON
BUG-3448: the MCP item resource's markdown printed a json field in Go's map syntax, the agent-facing form of the same defect, and rounded a number abo
internal/mcp/bug3448_item_markdown_fields_test.go:12
FunctionTestFormatItemAsMarkdown_FullShape
(t *testing.T)
internal/mcp/resources_test.go:210
FunctionTestFormatItemAsMarkdown_HandlesEmptyFields
(t *testing.T)
internal/mcp/resources_test.go:240
FunctionTestFormatItemAsMarkdown_HandlesMissingFields
(t *testing.T)
internal/mcp/resources_test.go:228
FunctionTestFormatItemAsMarkdown_RejectsInvalidJSON
(t *testing.T)
internal/mcp/resources_test.go:255
FunctionTestFormatLineDiffMarksChangesAndElidesDistantContext
(t *testing.T)
internal/cli/builtin_format_test.go:8
FunctionTestFormatLineDiffShowsAnEndOfFileNewlineChange
A change to the final newline alone is visible.
internal/cli/builtin_format_test.go:47
FunctionTestFormatMonitorLine
(t *testing.T)
cmd/pad/cmd_watch_test.go:64
FunctionTestFormatMonitorLine_OnlyPushGetsEnvelope
TestFormatMonitorLine_OnlyPushGetsEnvelope pins the D5 boundary: the authority framing ("direction from your user") appears for a push and for NOTHING
cmd/pad/cmd_watch_test.go:110
FunctionTestFormatNumber
(t *testing.T)
internal/mcp/number_test.go:11
FunctionTestFractionalSecondsRoundUp
TestFractionalSecondsRoundUp The column is compared as a string against a whole-second clock, so seconds are the stored resolution. Truncating resolv
internal/store/reminders_test.go:701
FunctionTestFreePortIsOutsideTheEphemeralRange
BUG-3491: freePort handed out ephemeral ports, the pool every parallel test binary binds :0 from, so another package's listener could take one between
internal/buildtools/bug3491_free_port_test.go:9
FunctionTestFreshInstanceRegistrationIsForbidden
(t *testing.T)
internal/server/handlers_auth_test.go:391
FunctionTestFromNativeShell
(t *testing.T)
internal/server/plan_limit_native_shell_test.go:227
FunctionTestFutureDeadlineIsNotOverdue
TestFutureDeadlineIsNotOverdue is the negative control for the comparison itself. Without it, a helper that reported EVERY item with a date would pass
internal/server/overdue_surfaces_test.go:162
FunctionTestG
(t *testing.T)
internal/buildtools/testdata/shardpkg/shard_test.go:13
FunctionTestG4_ChallengeRefusalsAreTheWellKnown404
Every refusal is the U0a 404, byte-identical to an unowned well-known path.
cmd/pad/task3321_g4_apps_challenge_test.go:42
FunctionTestG4_ChallengeServesExactTokenOnMCPHost
(t *testing.T)
cmd/pad/task3321_g4_apps_challenge_test.go:24
FunctionTestG4_OtherWellKnownPathsUnchanged
Setting the token changes no other /.well-known answer.
cmd/pad/task3321_g4_apps_challenge_test.go:71
FunctionTestGapAnnouncerBoundsTheRateWithoutLosingAGap
The announcer answers this: a slow subscriber answered with a delta sync can be made slower, drop more, and be answered again. The bound has to hold W
internal/server/stream_gap_announcer_test.go:16
FunctionTestGapAnnouncerDoesNotAnnounceAnEmptyWindow
The other direction: a window that closes with nothing latched must not announce. Without this, the announcer would emit a spurious sync_required ever
internal/server/stream_gap_announcer_test.go:50
FunctionTestGapChannelOutlivesUnsubscribe
TestGapChannelOutlivesUnsubscribe pins the lifetime rule stated on the field. Closing the gap channel would make it permanently ready, and a consumer
internal/events/gap_signal_test.go:669
FunctionTestGapSignalCoalesces
TestGapSignalCoalesces is the load bound stated on the field, asserted. Without capacity-1 coalescing, a subscriber that stops reading entirely would
internal/watchevents/gap_signal_test.go:103
FunctionTestGapSignalForASlowSubscriberIsNotBroadcast
TestGapSignalForASlowSubscriberIsNotBroadcast is the other scope, and its control leg is the whole point: a full channel is a fact about ONE connectio
internal/watchevents/gap_signal_test.go:66
FunctionTestGapSignalIsPerInstanceForAReceivedHole
TestGapSignalIsPerInstanceForAReceivedHole pins the SCOPE of the per-instance announcement, which is the part of BUG-2730 that was a design decision r
internal/watchevents/gap_signal_test.go:26
FunctionTestGateCreateQueuedBehindAMoveOfItsBlockerWritesNothing
A gate create queued behind a cross-workspace move of its blocker writes nothing: the pin re-validates under the locks.
internal/store/commitment_gates_pg_test.go:142
FunctionTestGateCycles
(t *testing.T)
internal/schedule/links_test.go:722
FunctionTestGateDeleteWithASoftDeletedBlockerAgainstACascadeDoesNotDeadlock
A gate delete whose blocker is soft-deleted still takes the root item first, then the workspace, and queues with a cascade without deadlock.
internal/store/commitment_gates_pg_test.go:113
FunctionTestGateDeleteWorksOnASoftDeletedEnd
A gate whose end was soft-deleted can still be removed, with the authority of a live one, and the remover cannot tell which end it was from the answer
internal/store/commitment_gates_test.go:138
FunctionTestGateFutureMovedOccurrenceStaysPending
(t *testing.T)
internal/store/commitment_gates_move_test.go:68
FunctionTestGateLateStaleTellsTheTruthAboutWhatWasAlreadyMigrated
gateLateStale's message differs from the pre-pass's in exactly one way that matters, and it is the one a test has to hold: the pre-pass runs before th
cmd/pad/cmd_db_unflushed_test.go:184
FunctionTestGateLimitsAreCheckedAtWriteAndShowNoCount
Limits are checked at write, and the refusal carries a code and no count.
internal/store/commitment_gates_test.go:199
FunctionTestGateMigrationPostgres
(t *testing.T)
internal/store/commitment_gates_migration_test.go:192
FunctionTestGateMigrationSQLite
(t *testing.T)
internal/store/commitment_gates_migration_test.go:174
FunctionTestGateOpensOnceWhenItsBlockerOccurrenceIsDone
---- the blocker is a commitment ----
internal/store/commitment_gates_outcome_test.go:82
FunctionTestGateOutcomes
(t *testing.T)
internal/schedule/links_test.go:689
FunctionTestGatePassedOverMovedOccurrenceDecisionActions
(t *testing.T)
internal/store/commitment_gates_move_test.go:102
FunctionTestGatePassedOverMovedOccurrenceDoneIsStale
(t *testing.T)
internal/store/commitment_gates_move_test.go:89
FunctionTestGatePassedOverMovedOccurrenceIsLapsed
(t *testing.T)
internal/store/commitment_gates_move_test.go:35
← previousnext →19,801–19,900 of 28,840, ranked by callers