MCPcopy Create free account

hub / github.com/Facets-cloud/flow / functions

Functions972 in github.com/Facets-cloud/flow

FunctionTestComputeSavings
(t *testing.T)
internal/stats/model_test.go:9
FunctionTestCreateAndGetOwner
(t *testing.T)
internal/flowdb/owners_test.go:9
FunctionTestDeleteOwner
(t *testing.T)
internal/flowdb/owners_test.go:257
FunctionTestDetectFlowTermInvalidFallsThrough
TestDetectFlowTermInvalidFallsThrough — an unrecognized FLOW_TERM value is silently ignored and TERM_PROGRAM detection takes over.
internal/spawner/spawner_test.go:211
FunctionTestDetectFlowTermOverride
TestDetectFlowTermOverride — FLOW_TERM with a valid backend value wins over TERM_PROGRAM but loses to ZELLIJ and kitty. Iterates over every valid back
internal/spawner/spawner_test.go:166
FunctionTestDetectFromEnv
TestDetectFromEnv verifies the TERM_PROGRAM → backend mapping. The Override knob and the ZELLIJ / kitty / FLOW_TERM checks have higher precedence and
internal/spawner/spawner_test.go:65
FunctionTestDetectGitRemoteBasic
(t *testing.T)
internal/app/workdir_test.go:238
FunctionTestDetectGitRemoteMissing
(t *testing.T)
internal/app/workdir_test.go:231
FunctionTestDetectKitty
TestDetectKitty verifies $KITTY_WINDOW_ID and $TERM=xterm-kitty both route to BackendKitty, and that kitty beats TERM_PROGRAM (kitty does not set TERM
internal/spawner/spawner_test.go:134
FunctionTestDetectKittyBeatsFlowTerm
TestDetectKittyBeatsFlowTerm — kitty's per-window markers beat FLOW_TERM, matching ZELLIJ's behavior. Rationale: if the user is inside kitty, that's w
internal/spawner/spawner_test.go:197
FunctionTestDetectZellij
TestDetectZellij verifies the ZELLIJ env var beats every other signal. zellij sets ZELLIJ in every shell it spawns, so its presence means the user is
internal/spawner/spawner_test.go:118
FunctionTestDueOwnersHandlesMixedTimezoneOffsets
(t *testing.T)
internal/flowdb/owners_test.go:273
FunctionTestDueOwnersReturnsOnlyActivePastDue
(t *testing.T)
internal/flowdb/owners_test.go:94
FunctionTestDueOwnersSkipsUnparseableNextWake
A row whose next_wake_at can't be parsed must be skipped, not crash the whole scheduler pass — DueOwners is defensive against a corrupt value.
internal/flowdb/owners_test.go:132
FunctionTestE2EFullRoundtrip
TestE2EFullRoundtrip exercises the full command surface in the order a user would hit it for a realistic session: init, add project, add task under th
internal/app/e2e_test.go:74
FunctionTestEncodeCwd
TestEncodeCwd pins the empirical rule derived from ~/.claude/projects/* vs. the original cwd recorded in each dir's *.jsonl. `/`, `.`, and `_` each ma
internal/harness/claude/claude_test.go:70
FunctionTestEnsureUpdatesDir
(t *testing.T)
internal/app/list_test.go:597
FunctionTestEnumerateAuxFiles
(t *testing.T)
internal/app/aux_test.go:10
FunctionTestEnumerateAuxFilesEmptyDir
(t *testing.T)
internal/app/aux_test.go:48
FunctionTestEnumerateAuxFilesMissingDir
(t *testing.T)
internal/app/aux_test.go:59
FunctionTestEscapeAppleScriptString
TestEscapeAppleScriptString covers the embedded helper directly so regressions in the script-path escape don't slip through.
internal/warp/warp_test.go:364
FunctionTestFocusSessionAcrossOSWindows
TestFocusSessionAcrossOSWindows — the match scan walks every OS window, not just the first.
internal/kitty/kitty_test.go:278
FunctionTestFocusSessionEmptyID
TestFocusSessionEmptyID short-circuits without touching ps.
internal/terminal/terminal_test.go:169
FunctionTestFocusSessionEmptyID
TestFocusSessionEmptyID short-circuits without invoking zellij.
internal/zellij/zellij_test.go:130
FunctionTestFocusSessionEmptyID
TestFocusSessionEmptyID short-circuits without invoking kitty.
internal/kitty/kitty_test.go:163
FunctionTestFocusSessionEmptyID
TestFocusSessionEmptyID short-circuits on empty UUID without touching ps.
internal/iterm/iterm_test.go:10
FunctionTestFocusSessionFocusError
TestFocusSessionFocusError surfaces focus-pane-id errors as a backend failure (distinct from "no match found").
internal/zellij/zellij_test.go:287
FunctionTestFocusSessionFocusError
TestFocusSessionFocusError — a focus-window failure surfaces as a backend error, not as "no match".
internal/kitty/kitty_test.go:380
FunctionTestFocusSessionListPanesError
TestFocusSessionListPanesError surfaces zellij CLI errors.
internal/zellij/zellij_test.go:275
FunctionTestFocusSessionLsError
TestFocusSessionLsError surfaces a `kitty @ ls` failure as a backend error (distinct from "no match found"), wrapped with the command context.
internal/kitty/kitty_test.go:365
FunctionTestFocusSessionMalformedJSON
TestFocusSessionMalformedJSON — protect against zellij output drift.
internal/zellij/zellij_test.go:304
FunctionTestFocusSessionMalformedJSON
TestFocusSessionMalformedJSON — guard against kitty output drift.
internal/kitty/kitty_test.go:406
FunctionTestFocusSessionMatchesAndFocuses
TestFocusSessionMatchesAndFocuses verifies the happy path drives osascript with the right tty against Terminal.app's dictionary.
internal/terminal/terminal_test.go:186
FunctionTestFocusSessionMatchesAndFocuses
TestFocusSessionMatchesAndFocuses verifies the happy path: list-panes JSON contains a non-plugin pane whose pane_command runs claude with the target U
internal/zellij/zellij_test.go:152
FunctionTestFocusSessionMatchesAndFocuses
TestFocusSessionMatchesAndFocuses verifies the happy path: a foreground process under a kitty window runs claude with the target UUID, and FocusSessio
internal/kitty/kitty_test.go:182
FunctionTestFocusSessionMatchesAndFocuses
TestFocusSessionMatchesAndFocuses confirms the happy path: ps returns a claude row carrying the UUID, FocusSession extracts the tty, drives osascript
internal/iterm/iterm_test.go:32
FunctionTestFocusSessionNoMatch
TestFocusSessionNoMatch — list-panes contains no claude with this UUID.
internal/zellij/zellij_test.go:230
FunctionTestFocusSessionNoMatch
TestFocusSessionNoMatch — no foreground process under any window runs claude with the target UUID; Runner must not be called.
internal/kitty/kitty_test.go:310
FunctionTestFocusSessionNoMatchInPS
TestFocusSessionNoMatchInPS returns (false, nil) without touching osascript.
internal/iterm/iterm_test.go:102
FunctionTestFocusSessionOsascriptError
TestFocusSessionOsascriptError surfaces script-runtime failures distinct from "no match".
internal/terminal/terminal_test.go:240
FunctionTestFocusSessionOsascriptError
TestFocusSessionOsascriptError surfaces the error too — distinguishes "the focus mechanism broke" from "no match found" so the caller can log it.
internal/iterm/iterm_test.go:183
FunctionTestFocusSessionPSError
TestFocusSessionPSError surfaces ps failures.
internal/terminal/terminal_test.go:230
FunctionTestFocusSessionPSError
TestFocusSessionPSError surfaces the error to the caller instead of silently treating it as "no match". The caller can then decide whether to fall thr
internal/iterm/iterm_test.go:169
FunctionTestFocusSessionResumeFlag
TestFocusSessionResumeFlag — covers --resume in pane_command.
internal/zellij/zellij_test.go:191
FunctionTestFocusSessionResumeFlag
TestFocusSessionResumeFlag covers `--resume <uuid>` in argv.
internal/kitty/kitty_test.go:225
FunctionTestFocusSessionResumeFlag
TestFocusSessionResumeFlag covers the --resume variant alongside --session-id, since both forms appear depending on whether the tab is in bootstrap or
internal/iterm/iterm_test.go:67
FunctionTestFocusSessionRoutesToITerm
TestFocusSessionRoutesToITerm — when Detect() resolves to iTerm, FocusSession invokes the iterm backend.
internal/spawner/spawner_test.go:333
FunctionTestFocusSessionRoutesToKitty
TestFocusSessionRoutesToKitty — Override=Kitty hits the kitty backend. The kitty backend uses `kitty @ ls` JSON rather than ps/tty, so the stub return
internal/spawner/spawner_test.go:389
FunctionTestFocusSessionRoutesToTerminal
TestFocusSessionRoutesToTerminal — Override=Terminal hits the terminal backend.
internal/spawner/spawner_test.go:351
FunctionTestFocusSessionRoutesToZellij
TestFocusSessionRoutesToZellij — Override=Zellij hits the zellij backend.
internal/spawner/spawner_test.go:369
FunctionTestFocusSessionScriptMissReturnsFalse
TestFocusSessionScriptMissReturnsFalse — ps found a match but the AppleScript walked all tabs without finding the tty.
internal/terminal/terminal_test.go:216
FunctionTestFocusSessionScriptMissReturnsFalse
TestFocusSessionScriptMissReturnsFalse covers the case where ps found a match but iTerm2's AppleScript walked all sessions without finding the tty (e.
internal/iterm/iterm_test.go:150
FunctionTestFocusSessionSkipsNoControllingTTY
TestFocusSessionSkipsNoControllingTTY ignores claude rows whose tty is "??".
internal/terminal/terminal_test.go:254
FunctionTestFocusSessionSkipsNoControllingTTY
TestFocusSessionSkipsNoControllingTTY ignores claude rows whose tty column is "??" — a backgrounded claude with no controlling terminal has nothing fo
internal/iterm/iterm_test.go:125
FunctionTestFocusSessionSkipsPluginPanes
TestFocusSessionSkipsPluginPanes — plugin panes (tab-bar, status-bar) have null pane_command and must not match.
internal/zellij/zellij_test.go:252
FunctionTestFocusSessionSkipsWindowsWithoutClaude
TestFocusSessionSkipsWindowsWithoutClaude — windows whose foreground_processes do not include the substring `claude` are skipped without running the r
internal/kitty/kitty_test.go:337
FunctionTestFocusSessionUUIDCaseInsensitive
TestFocusSessionUUIDCaseInsensitive — UUID match is case-insensitive.
internal/zellij/zellij_test.go:213
FunctionTestFocusSessionUUIDCaseInsensitive
TestFocusSessionUUIDCaseInsensitive — UUID match is case-insensitive, matching the iterm / zellij behaviour.
internal/kitty/kitty_test.go:254
FunctionTestFocusSessionUUIDCaseInsensitive
TestFocusSessionUUIDCaseInsensitive verifies the UUID match is case-insensitive (matches the existing liveClaudeSessions normalization behavior).
internal/iterm/iterm_test.go:86
FunctionTestHarnessForSpawn_AllPathsLandOnClaudeToday
TestHarnessForSpawn_AllPathsLandOnClaudeToday smoke-tests every branch of harnessForSpawn under the single-harness registry (claude is the only adapte
internal/app/harness_test.go:287
FunctionTestHarnessForTask
TestHarnessForTask covers the column → adapter lookup. NULL and empty resolve to claude+nil error (back-compat). Unknown non-empty names resolve to ni
internal/app/harness_test.go:39
FunctionTestHookSessionStartRequiresSkillInvocation
TestHookSessionStartRequiresSkillInvocation pins the invariant that the injected additionalContext explicitly instructs the session to invoke the flow
internal/app/hook_test.go:74
FunctionTestHookSessionStartUnboundEmitsAmbientHint
TestHookSessionStartUnboundEmitsAmbientHint pins the contract for ad-hoc sessions (no task carries the current $CLAUDE_CODE_SESSION_ID): the hook must
internal/app/hook_test.go:16
FunctionTestHookUserPromptSubmitBoundEmitsAnchor
TestHookUserPromptSubmitBoundEmitsAnchor pins the bound-session contract: when the current $CLAUDE_CODE_SESSION_ID belongs to a task, the hook injects
internal/app/hook_test.go:128
FunctionTestHookUserPromptSubmitUnboundIsNoOp
TestHookUserPromptSubmitUnboundIsNoOp pins the unbound contract: with no task carrying $CLAUDE_CODE_SESSION_ID (var unset, or set but unmatched), the
internal/app/hook_test.go:182
FunctionTestHumanCompact
(t *testing.T)
internal/app/stats_test.go:104
FunctionTestHumanInt
(t *testing.T)
internal/app/stats_test.go:129
FunctionTestIsAccessibilityDenied
TestIsAccessibilityDenied unit-tests the pattern matcher in isolation.
internal/terminal/terminal_test.go:142
FunctionTestIsBackground
TestIsBackground verifies the bg-mode selector. $FLOW_TERM=bg means "spawn as a terminal-free background agent" — distinct from the terminal backends
internal/spawner/spawner_test.go:18
FunctionTestLatestReleaseCacheTTLBoundary
TestLatestReleaseCacheTTLBoundary verifies the cache is treated as stale once it exceeds versionCacheTTL.
internal/app/release_test.go:82
FunctionTestLatestReleaseFetchesAndCaches
TestLatestReleaseFetchesAndCaches verifies the happy path: no cache → HTTP fetch succeeds → tag returned and cache written.
internal/app/release_test.go:42
FunctionTestLatestReleaseHonorsCache
TestLatestReleaseHonorsCache verifies a fresh cache short-circuits the HTTP path: even if the network is rigged to fail, a fresh cache returns the cac
internal/app/release_test.go:62
FunctionTestLatestReleaseSilentOnNetworkFailure
TestLatestReleaseSilentOnNetworkFailure pins the silent-failure contract: every error path returns "" so the SessionStart hook never blocks or surface
internal/app/release_test.go:108
FunctionTestLatestReleaseSilentOnNon200
TestLatestReleaseSilentOnNon200 covers rate-limited responses.
internal/app/release_test.go:120
FunctionTestLaunchCmd_PreservesByteIdentity
TestLaunchCmd_PreservesByteIdentity verifies the LaunchCmd output is byte-identical to the legacy command string that the pre-refactor do.go was produ
internal/harness/claude/claude_test.go:103
FunctionTestListOwnersOrdersAndFilters
(t *testing.T)
internal/flowdb/owners_test.go:46
FunctionTestListProjectsFilters
(t *testing.T)
internal/flowdb/db_test.go:111
FunctionTestListTagsAggregates
(t *testing.T)
internal/app/list_test.go:706
FunctionTestListTagsAggregatesValues
(t *testing.T)
internal/app/list_test.go:729
FunctionTestListTagsEmpty
(t *testing.T)
internal/app/list_test.go:722
FunctionTestListTasksDefaultExcludesPlaybookRuns
(t *testing.T)
internal/app/list_test.go:426
FunctionTestListTasksKindAll
(t *testing.T)
internal/app/list_test.go:482
FunctionTestListTasksKindOverride
(t *testing.T)
internal/app/list_test.go:457
FunctionTestLiveSessionsIncludesBackgroundAgents
TestLiveSessionsIncludesBackgroundAgents: the [live] detection used by `flow list` must count background agents (which don't show in the ps scan) as l
internal/app/background_test.go:331
FunctionTestLiveSessions_BareClaude
TestLiveSessions_BareClaude — a bare `claude` invocation (no --session-id, no --resume) contributes no UUID. Detection requires the flag.
internal/harness/claude/claude_test.go:219
FunctionTestLiveSessions_PSError
TestLiveSessions_PSError surfaces the ps failure to the caller. Callers in app/ swallow this silently — that's their policy. The harness layer just re
internal/harness/claude/claude_test.go:239
FunctionTestLiveSessions_ParsesPSOutput
TestLiveSessions_ParsesPSOutput verifies the ps-grep heuristic against a representative process list. Lines without "claude" are skipped; lines with t
internal/harness/claude/claude_test.go:186
FunctionTestLoadCacheCorrupt
TestLoadCacheCorrupt verifies the binding constraint that LoadCache never errors: a corrupt cache file must yield an empty, usable cache (not nil, non
internal/stats/cache_test.go:62
FunctionTestLoadConstantsCorrupt
(t *testing.T)
internal/stats/model_test.go:51
FunctionTestLoadConstantsDefaultsAndOverride
(t *testing.T)
internal/stats/model_test.go:30
FunctionTestMain
TestMain defaults claude.BGCommandRunner to an empty background-agent registry for the whole app test package. Without this, every show / list / do ov
internal/app/background_test.go:22
FunctionTestMaybeAutoUpgradeIdempotent
(t *testing.T)
internal/app/version_test.go:74
FunctionTestMaybeAutoUpgradeSkipsForDev
(t *testing.T)
internal/app/version_test.go:95
FunctionTestMaybeAutoUpgradeSkipsWhenSkillMissing
(t *testing.T)
internal/app/version_test.go:116
FunctionTestMaybeAutoUpgradeUpgradesOnMismatch
(t *testing.T)
internal/app/version_test.go:46
FunctionTestMigrationAddsAssignee
(t *testing.T)
internal/flowdb/db_test.go:194
FunctionTestMigrationAddsAutoRunColumns
TestMigrationAddsAutoRunColumns verifies the autonomous-run bookkeeping columns land on the tasks table and round-trip through ScanTask.
internal/flowdb/db_test.go:223
FunctionTestMigrationAddsDueDateAndStatusChangedAt
(t *testing.T)
internal/flowdb/db_test.go:181
FunctionTestMigrationAddsTasksKindAndPlaybookSlug
(t *testing.T)
internal/flowdb/db_test.go:380
FunctionTestMigrationDeduplicatesSessionIDs
TestMigrationDeduplicatesSessionIDs simulates Anshul's bug: a DB where two non-archived tasks share the same session_id (could happen via the now-remo
internal/flowdb/db_test.go:587
← previousnext →701–800 of 972, ranked by callers