MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestProvisionAppInstall_RelationRecheck
A relation value reaches an artifact only through a schema default (an artifact carries a fixed key set). The in-transaction derivation re-runs the RE
internal/server/handlers_apps_provision_test.go:550
FunctionTestProvisionAppInstall_SuppliedRelationTargetDeleted
A relation value the artifact itself SUPPLIES (here the playbook's trigger, redeclared as a relation) is carried as text when it no longer resolves, s
internal/server/handlers_apps_provision_test.go:835
FunctionTestProvisionDerive_WritesNothing
The in-transaction derivation only READS. It runs under the write-capture harness on a real transaction, relation passes included, and must record no
internal/server/handlers_apps_provision_test.go:761
FunctionTestPruneAndApplyAllowsReadOnlyRoom
TestPruneAndApplyAllowsReadOnlyRoom verifies the load-bearing writer-aware guard (TASK-265): a room whose only peers are read-only must NOT block the
internal/collab/applier_test.go:622
FunctionTestPruneAndApplyBlockedByLiveWriter
TestPruneAndApplyBlockedByLiveWriter confirms the complementary invariant: a live WRITER still blocks the prune (ErrRoomActiveDuringPrune) so the call
internal/collab/applier_test.go:654
FunctionTestPruneAndApplyEvictedPromotedViewerCannotPersist
(b) The race the fence exists for: a viewer promoted after the writer scan, whose frame is already read and queued on appendMu while the write runs. I
internal/collab/prune_evict_bug2103_test.go:109
FunctionTestPruneAndApplyFailedWriteRefreshesNobody
(c) A failed write rolled back, so the viewers are still current: nobody is evicted or refreshed.
internal/collab/prune_evict_bug2103_test.go:136
FunctionTestPruneAndApplyRefreshesReadOnlyPeers
(a) A read-only peer is force-refreshed after a successful direct write, and every conn in the room at write time is marked evicted.
internal/collab/prune_evict_bug2103_test.go:86
FunctionTestPruneAndApplyWriterPresentRefreshesNobody
(d) Control: a live writer still routes the caller to the applier path, and the viewer beside it is left alone.
internal/collab/prune_evict_bug2103_test.go:157
FunctionTestPruneIndexScript_LeavesLiveMembers
TestPruneIndexScript_LeavesLiveMembers. The prune re-checks existence INSIDE Redis, because between ListForUser's MGet and its prune a renewal can res
internal/server/session_presence_redis_round2_test.go:157
FunctionTestPruneNotifications
Kills: dropping the pending guard (an old pending row is deleted); dropping the created_at predicate (a young settled row is deleted).
internal/store/task3939_push_dispatch_test.go:400
FunctionTestPruneRemovesDeadSessionsChatSeen
(t *testing.T)
internal/cli/chat_seen_test.go:233
FunctionTestPruneSessions
(t *testing.T)
internal/cli/session_registry_test.go:341
FunctionTestPruneSessions_KeepsRowsFromAnotherPIDNamespace
TestPruneSessions_KeepsRowsFromAnotherPIDNamespace: prune and the prune that runs after every register both keep a row whose pid lives in a namespace
internal/cli/session_owner_pidns_linux_test.go:404
FunctionTestPruneSweepBailsOnClose
TestPruneSweepBailsOnClose ensures a sweep mid-loop respects a concurrent Close — once the manager is closed, the sweep stops iterating remaining item
internal/collab/manager_test.go:1717
FunctionTestPruneSweepDefaultMinAge
TestPruneSweepDefaultMinAge verifies that passing minAge=0 falls back to DefaultPruneMinAge rather than treating the cutoff as "now" (which would prun
internal/collab/manager_test.go:1665
FunctionTestPruneSweepEmpty
TestPruneSweepEmpty handles the no-eligible-rows case cleanly.
internal/collab/manager_test.go:1696
FunctionTestPruneSweepRemovesDormantItems
TestPruneSweepRemovesDormantItems is the TASK-1309 happy-path test: a sweep finds items whose entire op-log is older than minAge and prunes them whole
internal/collab/manager_test.go:1591
FunctionTestPruneSweepSkipsActiveRoom
TestPruneSweepSkipsActiveRoom verifies the dormant-item check honours an in-memory active Room — even if the database query returned the item as dorma
internal/collab/manager_test.go:1760
FunctionTestPruneSweepSkipsRowAddedMidSweep
TestPruneSweepSkipsRowAddedMidSweep exercises the mid-sweep race window: the dormancy listing returns item-a (it WAS dormant at query time), but a row
internal/collab/manager_test.go:1815
FunctionTestPublicLinkBaseURLPrecedence
TestPublicLinkBaseURLPrecedence pins the resolution order on the server-side accessor used to build emailed link targets: URL > PublicURL > constructe
internal/config/config_test.go:426
FunctionTestPublicShareDoorsCarryTheMarkerBothWays
TestPublicShareDoorsCarryTheMarkerBothWays covers the two public-share doors (BUG-3000), and covers them in BOTH directions on the same item. These t
internal/server/handlers_items_content_state_test.go:107
FunctionTestPublicURLAloneDoesNotMarkConfigured
TestPublicURLAloneDoesNotMarkConfigured guards against PUBLIC_URL affecting CLI control flow. IsConfigured() gates whether the CLI shows its "not conf
internal/config/config_test.go:496
FunctionTestPublicURLNotPersistedToTOML
TestPublicURLNotPersistedToTOML pins the contract that PUBLIC_URL is a runtime/deployment fact only and never gets written to config.toml. Without thi
internal/config/config_test.go:510
FunctionTestPublishFailureLogCarriesNoPayload
The line names outcome, event type and workspace, and never the payload.
internal/server/events_publish_test.go:91
FunctionTestPublishFailureLogIsRateBounded
BUG-2732: the failure log is rate-bounded, because shutdown and a Redis outage both fail every publish at once, and the bound is tested. A burst of pu
internal/server/events_publish_test.go:39
FunctionTestPublishFailureOutcomeSeesThroughWrapping
(t *testing.T)
internal/events/publish_outcome_test.go:88
FunctionTestPublishFailuresSeriesExistAtZero
BUG-2732: both series exist before the first failure, so a rate() reads zero rather than absent.
internal/metrics/publish_failures_test.go:40
FunctionTestPublishIsBoundedAgainstAStalledServer
The shared client ignores a context deadline on command I/O, so a stalled Redis held a publish for its full read timeout. The transport's own client h
internal/accesskick/accesskick_test.go:41
FunctionTestPublishNoSubscribers
(t *testing.T)
internal/events/bus_test.go:271
FunctionTestPurgeWorkspaceData_ClearsItemWorkspaceMovesBothDirections
TestPurgeWorkspaceData_ClearsItemWorkspaceMovesBothDirections covers the FK hazard the two-workspace shape introduces: item_workspace_moves references
internal/store/item_workspace_moves_test.go:372
FunctionTestPurgeWorkspaceData_RefusesLiveWorkspace
TestPurgeWorkspaceData_RefusesLiveWorkspace pins the critical safety guard: PurgeWorkspaceData must refuse to touch a workspace that is not soft-delet
internal/store/workspace_purge_test.go:309
FunctionTestPurgeWorkspaceData_RemovesAllChildDataNoOrphans
TestPurgeWorkspaceData_RemovesAllChildDataNoOrphans is the acceptance test: a fully-populated soft-deleted workspace is purged with NO child row left
internal/store/workspace_purge_test.go:249
FunctionTestPurgeWorkspaceLeavesChatMessages
(t *testing.T)
internal/store/conversations_test.go:1453
FunctionTestPushCmd_FormatJSON
TestPushCmd_FormatJSON covers a defect: --format json was silently ignored — the RunE hardcoded plain text regardless of formatFlag. Mirrors runCreate
cmd/pad/cmd_push_test.go:71
FunctionTestPushCmd_FormatJSONCarriesDeliveredSessions
TestPushCmd_FormatJSONCarriesDeliveredSessions. The field was added to cli.PushResult and nothing covered its serialization, so a regression in eithe
cmd/pad/cmd_push_test.go:121
FunctionTestPushCmd_RequiresNonBlankMessage
TestPushCmd_RequiresNonBlankMessage covers the client-side guard: an absent or whitespace-only -m never reaches the server at all.
cmd/pad/cmd_push_test.go:194
FunctionTestPushCmd_SendsCollapsedMessage
TestPushCmd_SendsCollapsedMessage covers the client round trip: the CLI posts the trimmed, newline-collapsed message to the item's /push endpoint and
cmd/pad/cmd_push_test.go:37
FunctionTestPushCmd_WarnsOnlyWhenTheOutcomeIsAmbiguous
TestPushCmd_WarnsOnlyWhenTheOutcomeIsAmbiguous (coverage-gap sweep). The classification helper is tested directly; nothing executed the command and c
cmd/pad/cmd_push_ambiguity_test.go:157
FunctionTestPushDeliverySymmetry_CountAgreesWithWhatTheStreamReceives
TestPushDeliverySymmetry_CountAgreesWithWhatTheStreamReceives is the end-to-end statement of what BUG-2725 is actually about: the count and the delive
internal/server/handlers_push_delivery_symmetry_test.go:39
FunctionTestPushDevices_Cap20_ConcurrentRegisters
Concurrent registers at 19 of 20 devices must not overshoot the cap. Without the Postgres user-row lock every transaction counts 19 and inserts, leavi
internal/store/push_devices_test.go:177
FunctionTestPushDevices_Cap20_EvictsOldest
Kills: no eviction (the 21st device is simply added), evicting the newest, or evicting by something other than updated_at.
internal/store/push_devices_test.go:133
FunctionTestPushDevices_Cap20_TieBreaksByCreatedAt
Ties on updated_at break by created_at, then id.
internal/store/push_devices_test.go:242
FunctionTestPushDevices_ConnectionIDValidation
(t *testing.T)
internal/server/handlers_push_devices_test.go:251
FunctionTestPushDevices_CrossUserReclaim_OwnershipFollowsLatestRegistration
Director pin 2. Kills: ownership by created_at (m6), a token-only lookup (m5). u1 keeps its first created_at on the reclaim, so only updated_at can ha
internal/store/push_devices_test.go:599
FunctionTestPushDevices_Delete_ScopedAndIdempotent
DeletePushDevice is scoped to the caller's session and connection id, and idempotent.
internal/store/push_devices_test.go:325
FunctionTestPushDevices_ExpiryCascades
Kills: a sweep that leaves the device of an expired session.
internal/store/push_devices_test.go:281
FunctionTestPushDevices_GoneSession401
Kills: a register against a session that ended before the write, and one that is simply gone, answering anything but 401.
internal/server/handlers_push_devices_test.go:321
FunctionTestPushDevices_LogoutCascades
Kills: removing push_devices.session_id's cascade; the logout path is DeleteSession.
internal/store/push_devices_test.go:263
FunctionTestPushDevices_LogoutCascades_HTTP
Logout deletes the session, which deletes its device row.
internal/server/handlers_push_devices_test.go:338
FunctionTestPushDevices_NoGateway404
Kills: answering 404 for the wrong reason, or without the token the app keys on; and checks the gate order (a token is refused before the 404).
internal/server/handlers_push_devices_test.go:225
FunctionTestPushDevices_PATRejected
Kills: a gate that lets a token, or a cookie riding with one, register.
internal/server/handlers_push_devices_test.go:155
FunctionTestPushDevices_PasswordChange_RebindsCallerOnly
The caller's device moves to the replacement session; another session's device is gone; the old session is gone. Kills: rebinding every session's devi
internal/store/push_devices_test.go:352
FunctionTestPushDevices_PasswordChange_RebindsCallerOnly
The password change: the caller's device survives on the replacement session, the other session's device is gone with its session. Kills: rebinding ev
internal/server/handlers_push_devices_test.go:366
FunctionTestPushDevices_RegisterAndDelete
(t *testing.T)
internal/server/handlers_push_devices_test.go:124
FunctionTestPushDevices_RegisterBodyValidation
(t *testing.T)
internal/server/handlers_push_devices_test.go:276
FunctionTestPushDevices_Register_BothKeys
The ruling's case (c): the caller's session holds token A, another session of the same user holds token B, and the caller now registers B. Kills dropp
internal/store/push_devices_test.go:102
FunctionTestPushDevices_Register_GoneOrExpiredSession
Kills: binding a device to a session that is gone or expired.
internal/store/push_devices_test.go:300
FunctionTestPushDevices_Register_NewTokenSameSession
Kills: a (user, token)-only delete, which leaves the session's old row and collides on session_id.
internal/store/push_devices_test.go:86
FunctionTestPushDevices_Register_OtherUserGetsFreshCreatedAt
Kills: a lookup on token alone (m5): u2 would inherit u1's row and created_at, and u1's row would be moved off its session.
internal/store/push_devices_test.go:578
FunctionTestPushDevices_Register_OtherUsersTokenUntouched
Another user holding the same token string is not touched.
internal/store/push_devices_test.go:118
FunctionTestPushDevices_Register_RegSeqStrictlyIncreases
Registers are strictly ordered: each new row's reg_seq exceeds every earlier one.
internal/store/task4031_push_reg_seq_test.go:73
FunctionTestPushDevices_Register_SameTokenNewSession
Kills: a plain INSERT, or a (user, token)-only delete: the old session is ALIVE and still holds the token.
internal/store/push_devices_test.go:70
FunctionTestPushDevices_Reregister_AdvancesRegSeq
Kills: a keep-row UPDATE without reg_seq; a re-register that changes id or created_at.
internal/store/task4031_push_reg_seq_test.go:48
FunctionTestPushDevices_Reregister_AtCapEvictsNothing
Kills: running the cap loop on the update path (m3): at the cap it would evict a device although the row count cannot grow.
internal/store/push_devices_test.go:523
FunctionTestPushDevices_Reregister_BothKeysKeepsB
Kills: dropping the session_id delete on the update path (m4: the caller's A row keeps the session and the UPDATE collides on session_id).
internal/store/push_devices_test.go:504
FunctionTestPushDevices_Reregister_IsNewestForTheCap
Director pin 1. Kills: an update path that does not refresh updated_at (m7): the re-registered OLDEST device would stay oldest and be the one evicted.
internal/store/push_devices_test.go:551
FunctionTestPushDevices_Reregister_NewSessionKeepsCreatedAt
Kills: resetting created_at, or not moving the row to the new session.
internal/store/push_devices_test.go:487
FunctionTestPushDevices_Reregister_SameSessionKeepsIDAndCreatedAt
Kills: resetting created_at (m1), minting a new id (m2), not refreshing updated_at (m7), or not carrying the new connection id / app version.
internal/store/push_devices_test.go:460
FunctionTestPushDevices_Rotation_DoesNotAdvanceRegSeq
A password-rotation rebind moves the session, it is not a registration. Kills: advancing reg_seq in the sessions.go rebind.
internal/store/task4031_push_reg_seq_test.go:91
FunctionTestPushDevices_Rotation_InjectedFailure_RevokesAll
Kills: dropping the fail-closed fallback: a failed rotation rolls back and would leave every old session alive.
internal/store/push_devices_test.go:380
FunctionTestPushDevices_Rotation_InjectedFailure_RevokesAll
Each credential-change door runs the same rotation: with the fault seam armed, every caller fails closed (500, every session revoked, the devices with
internal/server/handlers_push_devices_test.go:401
FunctionTestPushDevices_Rotation_KeepsTheFence
The credential-epoch fence and the active-user check survive the move into the transaction, and a refusal revokes too.
internal/store/push_devices_test.go:403
FunctionTestPushDevices_SameSecondCrossUserReclaim_LatestRegistrantOwns
TASK-4031. Two users register one phone, both rows are forced to the same second, and the PREVIOUS registrant (u1) holds the larger id. The old rule (
internal/store/task4031_push_reg_seq_test.go:25
FunctionTestPushDevices_Session_PushAvailable_IsJSONBool
push_available is a JSON bool on /auth/session for a SIGNED-IN caller, true only with a gateway, and is absent for an anonymous caller and on the pre-
internal/server/handlers_push_devices_test.go:599
FunctionTestPushDevices_UserCascade
Kills: dropping push_devices.user_id's cascade. In every real path a user's own sessions go first and take the device with them, so the test binds the
internal/store/notification_settings_test.go:157
FunctionTestPushDevices_ValidateSession_ReturnsID
Kills: a ValidateSession that does not select the id.
internal/store/push_devices_test.go:53
FunctionTestPushDispatchTimings_BadValueNamesTheVariable
A set knob that is malformed or not positive is an error naming its variable, never a silent default.
internal/config/push_dispatch_timings_test.go:50
FunctionTestPushDispatchTimings_EachKnobIsParsed
TASK-3939 part C: each env knob is read into its own timing field. Kills a knob read from the wrong variable or dropped from the parse.
internal/config/push_dispatch_timings_test.go:24
FunctionTestPushDispatchTimings_UnsetIsZero
(t *testing.T)
internal/config/push_dispatch_timings_test.go:41
FunctionTestPushDispatch_ChunkNotStartedWithoutTimeLeft
A chunk starts only if a whole send timeout is left before the deadline; otherwise its rows are unclaimed with no attempt burned.
internal/server/task3939b_push_dispatch_test.go:201
FunctionTestPushDispatch_CrossUserReclaimRoutesToTheLatestRegistrant
TASK-4027, cross-user reclaim at the dispatcher: bob registers the phone, carol signs in on it later (carol owns it), then bob re-registers (bob owns
internal/server/task4027_push_reregister_test.go:38
FunctionTestPushDispatch_DroppedParkedRowIsNotResentWhenExpireFails
TASK-4032. A parked row past the expiry age is dropped from the set even when its record fails again; if the expiry sweep failed in the same tick, the
internal/server/task4032_push_record_failure_test.go:541
FunctionTestPushDispatch_ExpireAndPruneLeaveALiveClaim
(t *testing.T)
internal/server/task3939b2a_push_test.go:461
FunctionTestPushDispatch_ExpireRunsWithoutASender
(t *testing.T)
internal/server/task3939b2a_push_test.go:536
FunctionTestPushDispatch_ExpiredParkedEntriesAreDropped
The parked set is bounded by the notification's expiry: an outage cannot grow it, and an expired row is never sent again.
internal/server/task4032_push_record_failure_test.go:113
FunctionTestPushDispatch_ExpiresPendingOlderThanAnHour
--- expire and retention ---
internal/server/task3939b2a_push_test.go:441
FunctionTestPushDispatch_FailedClaimLogsNoStoreError
A failed claim logs a fixed line: never the store's error text, which can echo a value, and never an id.
internal/server/task3939b_push_dispatch_test.go:446
FunctionTestPushDispatch_FifthRetryIsGatewayFailed
(t *testing.T)
internal/server/task3939b2a_push_test.go:315
FunctionTestPushDispatch_FreshClaimTokenPerTick
--- fresh token, settle under the claim token ---
internal/server/task3939b_push_dispatch_test.go:226
FunctionTestPushDispatch_FullUnrecordedSetHoldsClaimsAndSends
While the parked set is at its cap a tick claims and sends nothing, so no parked row is ever re-sent (nothing is evicted), and the full state logs onc
internal/server/task4032_push_record_failure_test.go:226
FunctionTestPushDispatch_GateErrorUnclaimsNeverSends
A gate that cannot be evaluated is not a denial: the row is unclaimed, no attempt is burned, no skip is recorded, and nothing is sent. Every lookup th
internal/server/task3939b_push_gates_test.go:354
FunctionTestPushDispatch_Gates
(t *testing.T)
internal/server/task3939b_push_gates_test.go:209
FunctionTestPushDispatch_GatewayFailuresWarnOncePerTickWithoutSecrets
(t *testing.T)
internal/server/task3939b2a_push_test.go:394
FunctionTestPushDispatch_HeldRecheckDropsRowsTakenMidTick
The pre-send re-check: rows taken by another instance while an earlier chunk was in flight are dropped from the next one.
internal/server/task3939b_push_dispatch_test.go:320
FunctionTestPushDispatch_InvalidTokenDeletesAnUntouchedDevice
Positive control: with no re-register the same verdict deletes the device.
internal/server/task3939b2a_push_test.go:380
FunctionTestPushDispatch_InvalidTokenKeepsARowWhoseTokenChanged
A late invalid_token is a verdict on the registration that was SENT. It must delete only a row that is still that registration: same id, same token AN
internal/server/task3939b2a_push_test.go:346
FunctionTestPushDispatch_InvalidTokenKeepsASameTokenReRegistration
Kills: dropping the reg_seq predicate; deleting by id (or id and token) only.
internal/server/task3939b2a_push_test.go:362
FunctionTestPushDispatch_LateSentRecordedWhenExpired
(t *testing.T)
internal/server/task3939b_push_dispatch_test.go:297
FunctionTestPushDispatch_LateSentRecordedWhenReclaimed
(t *testing.T)
internal/server/task3939b_push_dispatch_test.go:273
← previousnext →22,801–22,900 of 28,840, ranked by callers