Skip to content

Keep delegated history internal and add local-time display #1673

Description

@codeforester

Goal

Make command history reflect the user-facing orchestration boundary consistently, while allowing users to choose UTC or local display time.

Background

The merged history UX records a primary row for public commands and retains delegated trace records. A nested basectl onboard invocation currently inherits the internal scope, but the Bash-side primary recorder hardcodes scope: primary, so delegated check, setup, doctor, projects, and trust calls can leak into the default view. onboard also does not propagate its selected project metadata, so basectl history --project base can hide the onboarding row. History timestamps are canonical UTC but the text header does not identify the timezone.

Scope

  • Preserve the outer user invocation as the primary record.
  • Mark recursively invoked basectl commands as internal and link them to the outer run.
  • Propagate the selected onboarding project, root, and manifest where resolvable.
  • Keep UTC as the canonical/default history timezone.
  • Add basectl history --local-time for text/Markdown display in the host timezone.
  • Label text/Markdown time columns explicitly as UTC or local.
  • Keep JSON timestamps canonical ISO-8601 UTC; document the display-time behavior.
  • Update help, completions, docs, and focused tests.

Acceptance Criteria

  • basectl onboard <project> appears as one primary row with that project in the default history view.
  • Onboard's delegated commands are absent from default history and present with --include-internal, carrying the parent run ID.
  • Direct user invocations of check, setup, projects, etc. remain primary.
  • basectl history labels timestamps as UTC.
  • basectl history --local-time labels and renders text/Markdown timestamps in the local timezone.
  • JSON output remains stable and UTC regardless of display-time selection.
  • Existing history records remain readable.

Validation

  • Focused history Python and Bash tests.
  • Completion/help tests.
  • Full ./bin/base-test and hosted CI.

Non-Goals

  • Rewriting existing history records.
  • Changing raw log timestamp policy.
  • Adding arbitrary timezone selection beyond host local time.

Project Fields

  • Status: Backlog
  • Priority: P2
  • Area: CLI
  • Initiative: Contract Hardening
  • Size: M

Agent Assignment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or product improvement

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions