Repository navigation
Conversation
|
Reviewed current head 2425b29 on 2026-10-31. Existing Go, browser, security-analysis and Linux/Windows/macOS GUI checks are green. Keep this PR unmerged as agreed: the corresponding Time & Bill server safety contract is not yet integrated/deployed, and native credential-store plus authenticated staging/restart acceptance remain open. Once those gates are satisfied, integrate current main dependency/toolchain changes and rerun exact-head checks before reconsidering merge. No release or server deployment has been performed. |
Use unique dummy entries on Windows/macOS and a disposable D-Bus Secret Service session on Linux.
The real server clears a successfully booked timer. Preserve exact-target and receipt checks while accepting its idle zero-duration state instead of reporting an uncertain write.
There was a problem hiding this comment.
🟡 Changes recommended
Critical flaws can expose credentials, treat uncertain bookings as definitively rejected or successful, and lose recovery journals after a power failure.
6 open issues
Treat unvalidated mutation errors as uncertain outcomes · New Validate receipt error codes against credential reflection · New Make journal rename and directory creation crash-durable · New Require a valid operation and result ID for recovery · New Exclude unrestricted server reason from persisted outcomes · New Treat expired receipt lookups as uncertain outcomes · New
What changed in this PR
Adds an optional, online-only Time & Bill CLI alongside HumbleBee’s local-first workflows, without uploading or opening local databases.
Changes:
- Introduces remote profiles, reads, bookings, timer controls and mutation recovery.
- Adds authenticated safety-contract checks, secure credential storage and structured CLI output.
- Adds automated coverage, native-vault CI and documentation separating local verification from deployment and release gates.
| File | Description |
|---|---|
| SECURITY.md | Documents connected-client safety and reporting scope. |
| README.md | Introduces the pilot and links its guides. |
| internal/remotecli/writes.go | Defines booking, timer and recovery commands. |
| internal/remotecli/writes_test.go | Tests booking arguments and Unicode JSON output. |
| internal/remotecli/output.go | Formats results, diagnostics and recovery guidance. |
| internal/remotecli/command.go | Registers remote commands and profile selection. |
| internal/remotecli/command_test.go | Tests database isolation and account-local dates. |
| internal/connected/writes.go | Implements booking validation and mutation recovery. |
| internal/connected/writes_test.go | Tests journaling, lost responses and booking validation. |
| internal/connected/timers.go | Implements conditional timer operations and cleared-stop responses. |
| internal/connected/timers_test.go | Tests timer targets, reuse and booking intent. |
| internal/connected/reads.go | Implements validated remote data reads. |
| internal/connected/reads_test.go | Tests filtering, time units and note preservation. |
| internal/connected/profiles.go | Manages profiles, account bindings and state files. |
| internal/connected/profiles_test.go | Tests credential separation and profile safeguards. |
| internal/connected/operations.go | Defines mutation receipts and recovery journals. |
| internal/connected/keyring.go | Integrates native secure credential storage. |
| internal/connected/keyring_native_test.go | Adds opt-in native-vault round-trip checks. |
| internal/connected/errors.go | Defines safe errors and remote exit categories. |
| internal/connected/errors_test.go | Tests server-error exit mappings. |
| internal/connected/client.go | Adds authenticated, bounded transport without redirects. |
| internal/connected/client_test.go | Tests transport and protocol safeguards. |
| internal/connected/capabilities.go | Validates the server safety contract. |
| internal/cli/root.go | Integrates remote commands and error handling. |
| internal/cli/root_test.go | Tests local and remote exit classifications. |
| internal/cli/remote_process_test.go | Tests cross-process recovery and database isolation. |
| go.sum | Records credential-storage dependency checksums. |
| go.mod | Adds keyring and terminal dependencies. |
| docs/connected-cli.md | Documents operation, recovery and scripting behavior. |
| docs/connected-cli-test-plan.md | Records verification procedures and release gates. |
| cmd/humblebee/main.go | Preserves remote exit codes at process termination. |
| .github/workflows/test.yml | Adds native-vault checks across supported platforms. |
Review effort: Balanced
| failure := remoteError(code) | ||
| failure.definitive = true |
| if m.Resources.TimeUUID != "" && !validUUID(m.Resources.TimeUUID) || m.Resources.ProjectUUID != "" && !validUUID(m.Resources.ProjectUUID) || m.Resources.StopwatchID < 0 { | ||
| return false | ||
| } | ||
| return m.ErrorCode == "" || safeCode(m.ErrorCode) |
| if err == nil { | ||
| err = os.Rename(f.Name(), path) |
| if !validMutation(m, id, m.Operation) || a != nil && a.Operation != m.Operation { | ||
| return m, uncertain(id) | ||
| } |
| func (s *Store) saveAttempt(a *Attempt) error { | ||
| return writePrivateJSON(filepath.Join(s.dir, "operations", a.MutationID+".json"), a) | ||
| } |
| if err := s.Client.call(ctx, "get_mutation_status", map[string]any{"clientMutationId": id}, &response); err != nil { | ||
| return Mutation{}, err | ||
| } |


Summary
Verification
Hold / Release Gates
See docs/connected-cli.md and docs/connected-cli-test-plan.md.