MCPcopy Create free account

hub / github.com/PerpetualSoftware/pad / functions

Functions28,840 in github.com/PerpetualSoftware/pad

FunctionTestImportWorkspace_PrefixMustBeResolvable
Door 4: import. The permissive door, because a refusal here has a cost the other doors do not: a workspace that already carries a bad prefix would fai
internal/store/prefix_doors_test.go:138
FunctionTestImportWorkspace_PreservedSlugKeepsRefShapedSlugs
pad db migrate-to-pg copies a workspace to a new database with WithPreservedSlug, and an operator copy keeps every slug as the source has it (a slug i
internal/store/export_import_refslug_test.go:332
FunctionTestImportWorkspace_RealFailuresStayA500
TestImportWorkspace_RealFailuresStayA500 is the counterfactual. Mapping the caller-input refusal to 400 must not turn every import failure into one —
internal/server/handlers_workspace_import_refusal_status_test.go:80
FunctionTestImportWorkspace_RefShapedSlugAfterCollisionSuffix
A collision on a hyphen-free base must not leave the resolved slug ref-shaped: two over-long slugs truncate to the same 255 letters, and uniqueSlugQ w
internal/store/export_import_refslug_test.go:273
FunctionTestImportWorkspace_RefShapedSlugCollisions
(t *testing.T)
internal/store/export_import_refslug_test.go:154
FunctionTestImportWorkspace_RefShapedSlugOverlong
(t *testing.T)
internal/store/export_import_refslug_test.go:184
FunctionTestImportWorkspace_RefShapedSlugWarnings
(t *testing.T)
internal/store/export_import_refslug_test.go:197
FunctionTestImportWorkspace_RefShapedSlugs
(t *testing.T)
internal/store/export_import_refslug_test.go:134
FunctionTestImportWorkspace_SelfHostedIsUnaffected
TestImportWorkspace_SelfHostedIsUnaffected pins the other half of the obligation: enforceUserPlanLimit is a no-op off cloud, and this fix must not qui
internal/server/handlers_workspace_import_plan_limit_test.go:169
FunctionTestImportWorkspace_TitleValuedRelationHydratesAsStoredText
TestImportWorkspace_TitleValuedRelationHydratesAsStoredText is the case the bug was filed on: a bundle whose relation holds a TITLE imports verbatim (
internal/store/relation_stored_as_text_test.go:91
FunctionTestImportWorkspace_TruncatedSlugCollidesWithALaterVerbatimSlug
TestImportWorkspace_TruncatedSlugCollidesWithALaterVerbatimSlug regresses the slug collision case. Truncation can make this loop produce two identica
internal/store/items_title_validation_test.go:451
FunctionTestImportWorkspace_UnderTheLimitIsNotRefused
TestImportWorkspace_UnderTheLimitIsNotRefused is the control. Without it, a gate that refused every import — or one wired to the wrong feature key — p
internal/server/handlers_workspace_import_plan_limit_test.go:154
FunctionTestImportWorkspace_UnimportablePrefixIs400WithTheReason
BUG-2951, the fourth door. The workspace-import path answered 500 import_failed for EVERY failure, including the prefix-grammar refusal — whose messag
internal/server/handlers_workspace_import_refusal_status_test.go:24
FunctionTestImportWorkspace_UnresolvableRelationValueSurvivesAPrefixCollision
An unresolvable carried relation value survives the ID remap VERBATIM, even when it contains a resolvable id as a substring. `remapFieldIDs` rewrote
internal/store/relation_referents_test.go:602
FunctionTestImportWorkspace_WithCreateConsent_Imports
Control: import still works for a connection that may create. Without this, a guard that refused all imports outright would pass the two legs above.
internal/server/handlers_workspace_create_consent_test.go:416
FunctionTestImportedAckBundleCannotNameOutsider
End to end through workspace import: a bundle whose ack row names a user (here a non-member, under a differently cased key) reads back with no user.
internal/store/schedule_ack_test.go:435
FunctionTestImportedAckEvidenceDropsTheUser
Import never takes an account from a bundle: every imported acknowledgement loses its actor_user_id, whatever the key's case and whether or not the us
internal/store/schedule_ack_test.go:391
FunctionTestImportedFilenameSource
BUG-2819: what this server observed about the name wins; an unchanged name takes the bundle's claim when it is a known value, and "unknown" otherwise
internal/server/handlers_import_bundle_test.go:818
FunctionTestImportedScheduleFiresOnce
The imported schedule fires on the next tick, exactly once.
internal/store/schedule_carry_test.go:371
FunctionTestImportedWorkspaceDecodesBothHalves
The 201 keeps the workspace's own fields at the top level, so the summary wrapper must still decode them.
cmd/pad/import_summary_test.go:49
FunctionTestInFlightUploadHashes_ConcurrentReleaseReacquire
TestInFlightUploadHashes_ConcurrentReleaseReacquire pins that the prior sync.Map version raced when one release's decrement-to-zero ran in parallel wi
internal/server/orphan_gc_test.go:550
FunctionTestInFlight_MarkCountsAndReleases
(t *testing.T)
internal/attachments/staged_test.go:175
FunctionTestIncludeLocalRuntimeWhenUnconfigured
(t *testing.T)
cmd/pad/server_info_test.go:149
FunctionTestIncomingImplementedByReturnsIncomingImplementersOnly
(t *testing.T)
cmd/pad/query_test.go:29
FunctionTestIncompleteLogIsRefusedNotTruncated
The bundle used to return "alpha" for an op-log missing its middle row: a truncated, nonblank body. It now refuses with ErrIncompleteLog, as compactio
internal/materialize/task3574_incomplete_log_test.go:38
FunctionTestInitNonTTYNotAuthenticated
TestInitNonTTYNotAuthenticated verifies the BUG-2592 gate: a non-interactive `pad init` against an already-set-up but unauthenticated local instance e
cmd/pad/init_noninteractive_test.go:23
FunctionTestInit_RejectedEnvTokenFailsInsteadOfStoredFallback
TestInit_RejectedEnvTokenFailsInsteadOfStoredFallback covers PR #1160 With PAD_TOKEN set to a token the server rejects, `pad init`'s auth step used to
cmd/pad/env_token_override_test.go:242
FunctionTestInsertMCPAuditEntry_NullableFieldsPopulated
(t *testing.T)
internal/store/mcp_audit_test.go:127
FunctionTestInsertMCPAuditEntry_RequiredFields
(t *testing.T)
internal/store/mcp_audit_test.go:52
FunctionTestInsertMCPAuditEntry_RoundTrip
(t *testing.T)
internal/store/mcp_audit_test.go:78
FunctionTestInstallRefresh_AnchorsARelativeDataDirToTheServersCwd
A RELATIVE DATA DIR (BUG-4064): config.Load applies PAD_DATA_DIR verbatim, so the server resolves "data" against its own cwd, and the restart runs in
internal/buildtools/install_refresh_test.go:2222
FunctionTestInstallRefresh_CapturesArgvWithoutProc
THE ps FALLBACK: macOS has no /proc, so the argv capture found nothing there, the restart fell back to defaults, and the BUG-2897 fix was silently abs
internal/buildtools/install_refresh_test.go:996
FunctionTestInstallRefresh_ClearsThePIDFileInTheDataDir
THE PID FILE (BUG-4064): `pad server start` claims cfg.PIDFile(), <data dir>/pad.pid (cmd/pad/cmd_server.go, config.go). The refresh clears a stale on
internal/buildtools/install_refresh_test.go:2186
FunctionTestInstallRefresh_ConfigValuesIgnoreInlineComments
TOML INLINE COMMENTS: `port = 8080 # local server` is valid TOML and the Go parser accepts it. A value regex that swallows the comment resolves the po
internal/buildtools/install_refresh_test.go:946
FunctionTestInstallRefresh_FailsClosedWhenTheLANAddressIsUnknown
FAIL CLOSED when a wildcard bind's external address cannot be determined. The first version warned and exited 0 — this unit's own defect wearing a dif
internal/buildtools/install_refresh_test.go:1092
FunctionTestInstallRefresh_FailsWhenTheServerDoesNotComeBack
THE UNCONDITIONAL CLAIM — the third defect, found by reading the recipe rather than from either filing: "Server restarted." was printed after a comman
internal/buildtools/install_refresh_test.go:472
FunctionTestInstallRefresh_HoldsTheRefreshMarkerForTheRestartWindow
The marker exists for the restart, names this script, this port and a short deadline, lives where the CLI will look (the DataDir rule, not the cwd), a
internal/buildtools/install_refresh_marker_test.go:61
FunctionTestInstallRefresh_IgnoresNonNumericPortValues
A NON-NUMERIC PAD_PORT is ignored, as the application ignores it: config.go falls through to the next source rather than using a bad value, so a misty
internal/buildtools/install_refresh_test.go:1042
FunctionTestInstallRefresh_JudgesAPortOnlyListenerByItsOwnName
A listener on the port found by NEITHER candidate name is taken for the server only when its own argv[0] names a pad binary.
internal/buildtools/install_refresh_test.go:1825
FunctionTestInstallRefresh_KeepsAnEmptyTrailingArgument
AN EMPTY TRAILING ARGUMENT survives the argv round trip (BUG-3194): `read -a` dropped trailing empty fields, so the restart ran a shorter command than
internal/buildtools/install_refresh_test.go:1365
FunctionTestInstallRefresh_LeavesAServerOnAnotherPortRunning
A SECOND SERVER ON ANOTHER PORT is not the target (BUG-3194). A sibling seat's e2e server made this script refuse (the old guard counted every `server
internal/buildtools/install_refresh_test.go:1241
FunctionTestInstallRefresh_LeavesTheOldLogFileAndNamesTheNewOne
The old log file is the operator's: a refresh leaves it byte-for-byte as it was and says where the server logs now (BUG-4064).
internal/buildtools/install_refresh_test.go:2104
FunctionTestInstallRefresh_MatchesTheRunningServerNotTheBuiltName
The staged binary's NAME does not decide the match (BUG-3196). The running server is the installed binary; the build being installed has another name.
internal/buildtools/install_refresh_test.go:1797
FunctionTestInstallRefresh_NamesAStrayThatTookThePortBeforeTheRestart
In order: the refresh stops the server, and before it restarts it a pad CLI call auto-starts a stray on the port (a binary that predates the marker, o
internal/buildtools/install_refresh_marker_test.go:150
FunctionTestInstallRefresh_OrdinaryRefreshSucceeds
CONTROL: the ordinary path succeeds. Every refusal above is meaningless if the script refuses everything.
internal/buildtools/install_refresh_test.go:506
FunctionTestInstallRefresh_PIDFile_KeepsAFileThatDoesNotParse
(t *testing.T)
internal/buildtools/bug4068_pidfile_test.go:134
FunctionTestInstallRefresh_PIDFile_KeepsALiveSiblingWhenNothingWasStopped
(t *testing.T)
internal/buildtools/bug4068_pidfile_test.go:127
FunctionTestInstallRefresh_PIDFile_KeepsARecordNamingALiveSiblingWhileTheServerIsStopped
(t *testing.T)
internal/buildtools/bug4068_pidfile_test.go:107
FunctionTestInstallRefresh_PIDFile_OnlyESRCHIsDead
DEAD is ESRCH only (BUG-4068): a fake kill prints each message the builtin can, so EPERM and anything unrecognised are not dead.
internal/buildtools/bug4068_pidfile_test.go:223
FunctionTestInstallRefresh_PIDFile_ReadsOnlyWhatPadWrites
The reader checks lines against the SHAPE internal/cli/pidfile.go writes (BUG-4068): braces on their own lines, each inner line STARTING like a two-sp
internal/buildtools/bug4068_pidfile_test.go:187
FunctionTestInstallRefresh_PIDFile_RemovesADeadPidWhenNothingWasStopped
(t *testing.T)
internal/buildtools/bug4068_pidfile_test.go:120
FunctionTestInstallRefresh_PIDFile_RemovesAJSONRecordNamingTheStoppedServer
(t *testing.T)
internal/buildtools/bug4068_pidfile_test.go:101
FunctionTestInstallRefresh_PIDFile_RemovesALegacyBareIntegerNamingTheStoppedServer
(t *testing.T)
internal/buildtools/bug4068_pidfile_test.go:114
FunctionTestInstallRefresh_PIDFile_RemovesTheStoppedPidEvenWhenTheExeDiffersBecauseTheStopProvedTheProcess
(t *testing.T)
internal/buildtools/bug4068_pidfile_test.go:140
FunctionTestInstallRefresh_PIDFile_TheStoppedPidLegRemovesEvenALivePid
The stopped-pid leg on its own (BUG-4068). The e2e stopped-server rows reach it too: their pre-server is this test's own child, a zombie after the TER
internal/buildtools/bug4068_pidfile_test.go:250
FunctionTestInstallRefresh_ParsesEqualsSeparatedFlags
THE `--flag=value` SPELLING: Cobra accepts both `--port 8080` and `--port=8080`, so a parser that reads only the space-separated form probes the wrong
internal/buildtools/install_refresh_test.go:718
FunctionTestInstallRefresh_ProbesIPv6HostsWithBrackets
IPv6: `::1` must be bracketed in the probe URL, or curl is handed http://::1:PORT/... — not a URL — and a healthy IPv6-bound server reads as unreachab
internal/buildtools/install_refresh_test.go:847
FunctionTestInstallRefresh_ProbesThePortFromTheCapturedArgv
PORT FROM THE CAPTURED ARGV: a server started with `--port N` is restarted with `--port N`, so the probe must go to N. The defect was that probing a
internal/buildtools/install_refresh_test.go:671
FunctionTestInstallRefresh_RefusesAForeignBuildWithoutStoppingAnything
THE ARTIFACT CHECK (TASK-2787, and the ordering CONVE-2687 asks for): a binary at the shared path carrying a DIFFERENT commit — the reversed-ordering
internal/buildtools/install_refresh_test.go:388
FunctionTestInstallRefresh_RefusesAForeignListenerBesideTheTarget
A FOREIGN LISTENER BESIDE THE TARGET, on the same port at another address, makes the port ambiguous and is refused (BUG-3194): the captured server mat
internal/buildtools/install_refresh_test.go:1328
FunctionTestInstallRefresh_RefusesALoneServerWithoutAnExplicitPort
A LONE SIBLING SERVER while this box's server is down is not the target (BUG-3194): nothing listens on the resolved port, and the one `server start` r
internal/buildtools/install_refresh_test.go:1404
FunctionTestInstallRefresh_RefusesAServerWhoseCwdWasDeleted
A server whose directory has been deleted cannot be put back where it was, so the refresh refuses, naming the path, before anything is stopped.
internal/buildtools/install_refresh_test.go:1753
FunctionTestInstallRefresh_RefusesAnUnreadableCwdNamingWhatWasRead
An UNREADABLE server cwd is refused like a missing one, naming what was read and why it failed. Reached deterministically: PAD_NO_PROC forces the lsof
internal/buildtools/install_refresh_test.go:1878
FunctionTestInstallRefresh_RefusesAnUnwritableLogBeforeStopping
AN UNWRITABLE LOG REFUSES BEFORE THE STOP (BUG-4064): a redirect that cannot open its target never runs the command, so a log found unwritable after t
internal/buildtools/install_refresh_test.go:2144
FunctionTestInstallRefresh_RefusesSuccessWhenTheListenerIsNotTheRestart
The probe answers for whoever holds the address. Here a stray beats the restart to the port after it is spawned, so the probe PASSES, and the only thi
internal/buildtools/install_refresh_marker_test.go:193
FunctionTestInstallRefresh_RefusesUnresolvableCommitEvenOnAPrefixMatch
AN UNRESOLVABLE ID IS REFUSED, even when it shares a prefix with the expected one. The prefix fallback existed for binaries built outside this checko
internal/buildtools/install_refresh_test.go:1447
FunctionTestInstallRefresh_RefusesWhenSeveralServersAreRunning
MORE THAN ONE SERVER is refused rather than guessed. The stop is a system-wide `pkill -x` and the restart can only restore one argv, so a second serve
internal/buildtools/install_refresh_test.go:1154
FunctionTestInstallRefresh_RefusesWhenTheInstalledFileIsNotWhatWasBuilt
THE OUTCOME CHECK (TASK-2787's actual ask): the check that matters is on the DESTINATION, not on any step. Here the source is exactly what this invoca
internal/buildtools/install_refresh_test.go:540
FunctionTestInstallRefresh_RefusesWhenThePortIsHeldByAnotherProcess
THE PORT HELD BY SOMETHING ELSE is refused (BUG-3194): the listener is not a `server start` this script captured, so there is nothing it may replace t
internal/buildtools/install_refresh_test.go:1289
FunctionTestInstallRefresh_ResolvesHostAndPortFromTheConfigFile
HOST AND PORT FROM THE CONFIG FILE: a server whose bind comes from ~/.pad/config.toml alone restarts correctly and must be probed there. The previous
internal/buildtools/install_refresh_test.go:795
FunctionTestInstallRefresh_RestartedServerLogsToTheConfiguredLogFile
THE SERVER LOG (BUG-4064): the restarted server writes to the file `pad server info` reports, cfg.LogFile() = <data dir>/logs/server.log, on both rest
internal/buildtools/install_refresh_test.go:2034
FunctionTestInstallRefresh_RestartsInTheServersOwnCwd
BUG-3196: the restart runs in the directory the SERVER was running in, not in the directory the refresh was run from. Before the fix a refresh run fro
internal/buildtools/install_refresh_test.go:1708
FunctionTestInstallRefresh_RestartsWithTheKilledArgv
THE ARGV (BUG-2897): the server comes back with the flags the killed process had, not with whatever an auto-start defaults to.
internal/buildtools/install_refresh_test.go:416
FunctionTestInstallRefresh_RestartsWithoutSetsid
THE NO-SETSID FALLBACK: setsid is Linux-specific and absent from a default macOS environment, where an unconditional call fails AFTER the old server h
internal/buildtools/install_refresh_test.go:764
FunctionTestInstallRefresh_StillRefusesAGenuinelyDifferentCommit
...and a DIFFERENT commit of the same width is still refused, or the fix above would have turned the guard off rather than widened it.
internal/buildtools/install_refresh_test.go:644
FunctionTestInstallRefresh_ToleratesDifferingCommitAbbreviationWidths
ABBREVIATION LENGTH: an expected commit and an embedded one that differ in WIDTH still match, because both are resolved to full object ids and compare
internal/buildtools/install_refresh_test.go:594
FunctionTestInstallRefresh_WebStampCheckUsesTheCallersCheckout
BUG-3403: the restart enters the running server's own cwd, which is often not a checkout at all (a pad auto-started from another project). The stale-b
internal/buildtools/install_refresh_test.go:1943
FunctionTestInstallRefresh_WildcardBindMustAnswerOnLoopback
THE ORIGINAL DEFECT, and until now the only scenario in this file that was never exercised: a WILDCARD bind promises loopback as well as the LAN addre
internal/buildtools/install_refresh_test.go:910
FunctionTestInstall_DebouncesTheItemLevelSets
Install installs the re-ask window beside the resolver (TASK-3916): ReaskDebounce for the item-level sets the production registry ships, none for a se
internal/decision/attention_test.go:183
FunctionTestInstaller_ClaudeCode_UsesCWDNotHome
--- Claude Code (cwd-based .mcp.json) ------------------------------------
internal/mcp/install_test.go:790
FunctionTestInstaller_Codex_InstallUninstallStatus
(t *testing.T)
internal/mcp/install_test.go:746
FunctionTestInstaller_CompactModesConfigureCursorAndCodex
(t *testing.T)
internal/mcp/install_test.go:304
FunctionTestInstaller_Install_MissingBinaryErrors
(t *testing.T)
internal/mcp/install_test.go:361
FunctionTestInstaller_Install_RoundTripWithTempHome
(t *testing.T)
internal/mcp/install_test.go:281
FunctionTestInstaller_RejectsConflictingCompactModes
(t *testing.T)
internal/mcp/install_test.go:348
FunctionTestInstaller_Status_ReportsAllAgents
(t *testing.T)
internal/mcp/install_test.go:391
FunctionTestInstaller_Uninstall_AfterInstall
(t *testing.T)
internal/mcp/install_test.go:368
FunctionTestInstantReminderPausesAfterClose
(t *testing.T)
internal/store/schedule_fire_closed_test.go:89
FunctionTestInstructionsMDCoversEveryCatalogAction
TASK-2005 drift guard. The MCP tool catalog (internal/mcp/catalog_*.go, authoritative) is the source of truth for what tools + actions exist. Three d
internal/mcp/tool_surface_drift_test.go:40
FunctionTestInstructionsMDVersionMatchesToolSurface
TestInstructionsMDVersionMatchesToolSurface pins the "## Tool surface (vX)" heading in instructions.md to the current ToolSurfaceVersion. Bump ToolSur
internal/mcp/tool_surface_drift_test.go:82
FunctionTestInstrumentedBusCountsPublishFailuresByOutcome
(t *testing.T)
internal/metrics/publish_failures_test.go:53
FunctionTestInstrumentedBusForwardsTheReplay
SubscribeAndReplaySince is the wrapper's other new method; the replay it forwards is what the SSE handler writes to the client, so dropping it would s
internal/metrics/events_gap_wiring_test.go:44
FunctionTestInstrumentedBusPassesTheGapChannelThrough
The wrapper is the only events.EventBus implementation that does not originate a gap channel — it passes the inner bus's through. A wrapper that retur
internal/metrics/events_gap_wiring_test.go:15
FunctionTestInstrumentedBus_Publish
(t *testing.T)
internal/metrics/metrics_test.go:432
FunctionTestInstrumentedBus_SubscribeUnsubscribe
(t *testing.T)
internal/metrics/metrics_test.go:385
FunctionTestInstrumentedBus_SubscriberCount
(t *testing.T)
internal/metrics/metrics_test.go:453
FunctionTestInterchangeGolden_RoundTrip
(t *testing.T)
internal/server/interchange_golden_test.go:55
FunctionTestInterruptOnDeadlineAndReuse
(t *testing.T)
internal/materialize/materialize_test.go:188
FunctionTestInterviewingTemplate
TestInterviewingTemplate verifies the interviewing (candidate-side) template ships the expected collections, conventions, and playbooks with the inter
internal/collections/templates_test.go:482
FunctionTestInvalidUTF8MergesOnKeyIncompleteRows
A value whose row has an INCOMPLETE key (a NULL in its primary key, which SQLite permits) and carries both defects is still ONE violation. Two such ro
internal/store/nulutf8_test.go:147
← previousnext →20,401–20,500 of 28,840, ranked by callers