tftsr-devops_investigation/tests/unit
Shaun Arman 7d8d5bdbba
All checks were successful
Test / frontend-typecheck (pull_request) Successful in 1m36s
Test / frontend-tests (pull_request) Successful in 1m40s
PR Review Automation / review (pull_request) Successful in 10m27s
Test / rust-fmt-check (pull_request) Successful in 11m4s
Test / rust-clippy (pull_request) Successful in 12m50s
Test / rust-tests (pull_request) Successful in 14m20s
fix(classifier): fix 3 safety bugs, extract const arrays, make tier UI dynamic
Bug 1 — Dead multi-word tier3 entries / missing single-token commands
  parse_single_command() extracts only the first token as `command`, so
  multi-word entries like "kill -9", "init 0", "service stop" in the tier3
  array never matched. Adding the single-token forms "kill", "pkill",
  "killall", "init" to TIER3_COMMANDS ensures these commands are always
  denied. Removed all dead multi-word entries.

Bug 2 — systemctl Tier 1 special case was dead code
  systemctl was not in tier1_general, so the block that was supposed to
  auto-execute `systemctl status` never ran. Moved systemctl handling into
  its own block (TIER1_SYSTEMCTL_SUBCOMMANDS / TIER2_SYSTEMCTL_SUBCOMMANDS)
  evaluated before the general tier checks. status, is-active, is-enabled,
  list-units, list-unit-files → Tier 1; all others → Tier 2.

Bug 3 — ldapmodify / ldapdelete / ldapadd misclassified as Tier 1
  Both appeared in the old tier1_general and tier2_general arrays; the tier1
  check ran first, so LDAP write operations auto-executed. Removed them from
  tier1. ldapsearch (read-only) remains Tier 1.

Dynamic Safety Architecture UI
  Extracted all tier classification arrays to module-level pub const slices
  (TIER3_COMMANDS, TIER1_KUBECTL_SUBCOMMANDS, etc.) so both the classifier
  logic and a new get_classifier_rules() Tauri command share a single source
  of truth. ShellExecution.tsx now calls getClassifierRulesCmd() on mount and
  renders the actual command lists in collapsible per-tier cards — any change
  to the const arrays is automatically reflected in the UI with no manual
  documentation update needed.

Also fixes the cargo fmt CI failure introduced in the previous commit
(ClusterClient::new call reformatted to a single line).
2026-06-07 18:15:42 -05:00
..
aiProvidersCustomRest.test.ts chore: remove all proprietary vendor references for public release 2026-04-07 09:46:25 -05:00
aiProvidersOllamaDropdown.test.tsx test: add shell execution and tool calling detection tests 2026-06-05 08:26:22 -05:00
attachmentStore.test.ts feat: attachment DB storage and cross-incident recall 2026-05-31 17:55:47 -05:00
auditLog.test.tsx fix(test): await async data in auditLog test to prevent race condition 2026-04-19 20:21:37 -05:00
autoTagWorkflowTrigger.test.ts.disabled fix: update tests to use .gitea workflows and disable GitHub-specific tests 2026-06-05 15:03:27 -05:00
ciDockerBuilders.test.ts.disabled fix: remove remaining proprietary references and fix branding 2026-06-05 16:00:33 -05:00
ClusterDetails.test.tsx fix(kube): bridge kubeconfig storage to in-memory cluster map and fix UI issues 2026-06-07 17:39:07 -05:00
ClusterOverview.test.tsx fix(kube): bridge kubeconfig storage to in-memory cluster map and fix UI issues 2026-06-07 17:39:07 -05:00
CommandPalette.test.tsx feat(kubernetes): implement Lens Desktop v5 feature-parity UI 2026-06-07 16:41:28 -05:00
ConfigMapDetail.test.tsx feat(kubernetes): implement Lens Desktop v5 feature-parity UI 2026-06-07 16:41:28 -05:00
CreateResourceModal.test.tsx feat(kubernetes): implement Lens Desktop v5 feature-parity UI 2026-06-07 16:41:28 -05:00
dashboard.test.tsx chore: Add GitHub Actions workflows 2026-04-08 21:53:44 -05:00
DeploymentDetail.test.tsx feat(kubernetes): implement Lens Desktop v5 feature-parity UI 2026-06-07 16:41:28 -05:00
detectToolCalling.test.ts test: add shell execution and tool calling detection tests 2026-06-05 08:26:22 -05:00
docEditor.test.tsx fix: UI contrast issues and ARM64 build failure 2026-04-03 08:05:58 -05:00
domainPrompts.test.ts feat: wire incident response methodology into AI and record triage events 2026-04-19 18:13:47 -05:00
EditResourceModal.test.tsx feat(kubernetes): implement Lens Desktop v5 feature-parity UI 2026-06-07 16:41:28 -05:00
exportDocument.test.ts fix: UI contrast issues and ARM64 build failure 2026-04-03 08:05:58 -05:00
history.test.tsx fix: lint fixes and formatting cleanup 2026-04-09 20:42:40 -05:00
historyStore.test.ts fix: dashboard shows — while loading, exposes errors, adds refresh button 2026-03-31 08:55:05 -05:00
Hotbar.test.tsx fix(kube): bridge kubeconfig storage to in-memory cluster map and fix UI issues 2026-06-07 17:39:07 -05:00
issueActions.test.ts feat: close issues, restore history, auto-save resolution steps 2026-03-31 12:50:39 -05:00
kubernetesCommands.test.ts fix(kube): bridge kubeconfig storage to in-memory cluster map and fix UI issues 2026-06-07 17:39:07 -05:00
KubernetesPage.test.tsx feat(kubernetes): implement Lens Desktop v5 feature-parity UI 2026-06-07 16:41:28 -05:00
kubernetesStore.test.ts feat(kubernetes): implement Phase 1 & 2: resource discovery UIs and advanced features 2026-06-07 10:24:26 -05:00
MetricsChart.test.tsx feat(kubernetes): implement Lens Desktop v5 feature-parity UI 2026-06-07 16:41:28 -05:00
NewResourceTypes.test.tsx feat(kubernetes): implement Lens Desktop v5 feature-parity UI 2026-06-07 16:41:28 -05:00
pii.test.ts feat: initial implementation of TFTSR IT Triage & RCA application 2026-03-14 22:36:25 -05:00
PodDetail.test.tsx feat(kubernetes): implement Lens Desktop v5 feature-parity UI 2026-06-07 16:41:28 -05:00
RbacViewer.test.tsx feat(kubernetes): implement Lens Desktop v5 feature-parity UI 2026-06-07 16:41:28 -05:00
releaseWorkflowCrossPlatformArtifacts.test.ts.disabled fix: update tests to use .gitea workflows and disable GitHub-specific tests 2026-06-05 15:03:27 -05:00
releaseWorkflowMacBundle.test.ts.disabled fix: update tests to use .gitea workflows and disable GitHub-specific tests 2026-06-05 15:03:27 -05:00
resolution.test.tsx feat: wire incident response methodology into AI and record triage events 2026-04-19 18:13:47 -05:00
SecretDetail.test.tsx feat(kubernetes): implement Lens Desktop v5 feature-parity UI 2026-06-07 16:41:28 -05:00
selectDropdownViewport.test.tsx test: add shell execution and tool calling detection tests 2026-06-05 08:26:22 -05:00
sessionStore.test.ts feat: initial implementation of TFTSR IT Triage & RCA application 2026-03-14 22:36:25 -05:00
settingsStore.test.ts feat: full copy from apollo_nxt-trcaa with complete sanitization 2026-06-05 14:12:43 -05:00
setup.ts feat: full copy from apollo_nxt-trcaa with complete sanitization 2026-06-05 14:12:43 -05:00
shellCommands.test.ts fix(classifier): fix 3 safety bugs, extract const arrays, make tier UI dynamic 2026-06-07 18:15:42 -05:00
Terminal.test.tsx feat(kubernetes): implement Lens Desktop v5 feature-parity UI 2026-06-07 16:41:28 -05:00
timelineEvents.test.ts feat: wire incident response methodology into AI and record triage events 2026-04-19 18:13:47 -05:00
YamlEditor.test.tsx feat(kubernetes): implement Lens Desktop v5 feature-parity UI 2026-06-07 16:41:28 -05:00