Skip to content

bug(cli): openshell rule history shows timestamps as "20770d 15:54" #5556

Closed

Description

@RafiB982

User Story

I use OpenShell's openshell rule commands to review agent and denial-derived network rules.
I directly encountered rule history printing a day count of about 20770 for events that happened minutes earlier.
This affects reviewers reading the decision timeline.

Problem Statement

Every entry in openshell rule history starts with 20770d HH:MM. 20770 days is the time since the Unix epoch, so the day field shows days-since-1970 instead of a date or a relative age.

Impact / Why This Matters

The history view can't tell reviewers when a rule was proposed, rejected or approved beyond the time of day. Entries from different days look identical apart from the clock time, which makes the review/audit timeline unreliable.

Acceptance Criteria

  • openshell rule history shows a full date (or a correct relative age) for each entry.

Reproduction Steps

  1. Create a sandbox and produce one denial (e.g. openshell sandbox exec demo -- bash -c '(exec 3<>/dev/tcp/example.com/80)').
  2. Wait ~15 s for the draft to appear, then run openshell rule history demo.

Environment

  • OpenShell: 0.1.9-pre.3 (snap rev 2564)
  • OS: Ubuntu 26.04.1 LTS; Docker compute driver

Logs

$ openshell rule history demo
Rule History:

  20770d 15:54 proposed [d6c48dd8] Rule 'example_docs_get' proposed (confidence: 65%)
  20770d 15:54 proposed [b894a5b6] Rule 'example_docs_get' proposed (confidence: 75%)
  20770d 15:55 rejected [b894a5b6] Rule 'example_docs_get' rejected
  20770d 15:55 approved [d6c48dd8] Rule 'example_docs_get' approved

Activity

  1. added
    state:acceptedA maintainer decided OpenShell should pursue this issue
    and removed
    state:triage-neededOpened without agent diagnostics and needs triage
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:acceptedA maintainer decided OpenShell should pursue this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions