Skip to content

FEAT: show goal pursuit duration and require patched Go 1.27.4 - #103

Merged
merefield merged 3 commits into
mainfrom
feat/goal-pursuit-duration
Nov 12, 2026
Merged

merefield merged 3 commits into
mainfrom
feat/goal-pursuit-duration

Conversation

@merefield

@merefield merefield commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Why

Goal status currently shows whether a goal is being pursued, stalled or complete, but not how much time Codex has recorded against it. Expose the existing per-goal counter without introducing another clock or local persistence.

Changes

  • Terminal goal labels show a compact duration when space permits, e.g. PURSUING GOAL // 1d 1h 23m, both below session-row statusline fields and in the full-detail footer.
  • Omit zero units, round down to whole minutes and show <1m for a reported duration below one minute. Long durations are formatted directly from seconds to avoid time.Duration overflow.
  • Prefer the existing goal status over its duration as space shrinks; preserve footer statusline space and the Copy control's exact position and click target. Stale observations omit the duration.
  • Use only Codex's timeUsedSeconds: no interpolation from creation/update timestamps, no ticking local timer, no API or persistence changes. Paused, stalled and completed goals retain their last reported duration.
  • Document timing semantics and refresh the synthetic README screenshot set, with a representative goal duration in the Sessions hero.

The duration presentation is terminal-only; browser goal presentation and backend accounting are unchanged. No application version bump or release is included.

Go security update

CI reported GO-2026-6859, an HTTP/1 server crash caused by a MaxBytesReader header race in Go's net/http standard library. The failing scan identifies Go 1.27.4 as the fixed version.

  • Raise the minimum Go version from 1.27.3 to 1.27.4 in go.mod.
  • CI, security scans and release builds already use go-version-file: go.mod, so all pick up the fix without separate workflow pins.
  • Keep the README and intro post's source-build requirements in sync. No application dependency versions or security-check exclusions are changed.

Codex patch compatibility

  • Extend the opt-in native compatibility test's explicit allowlist to include Codex 0.167.1 and 0.167.2, retaining the 0.164.0/0.166.0/0.167.0 targets and legacy baseline invocation.
  • Update the README's native-test example to 0.167.2. This changes test coverage only, not production version detection or protocol handling.
  • The upstream 0.167.0 → 0.167.2 review found no app-server schema changes requiring an adapter update.

Validation

  • CODEXOMETER_TEST_CODEX_VERSION=0.167.2 go test -race ./internal/codex -run '^TestNativeCodexCompression$' -count=1 -v -timeout 1m — passed against the installed 0.167.2 binary: zstd-stream-v1 negotiation, five feature-inventory RPCs and an empty loaded-thread list. Uses an isolated temporary Codex home, no user credentials and no model requests. 0.167.1 is accepted by the harness but was not separately live-tested.
  • GOTOOLCHAIN=go1.27.4 go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./... — passed: No vulnerabilities found.
  • Targeted goal tests: formatting boundaries through days, omitted zero units, sub-minute values, maximum int64, all supported goal states, stale observations, exact fit/fallback widths, server-counter semantics and Copy click-surface stability.
  • go test -race -cover -timeout 10m -skip '^TestLocalisedScreens$' ./... — passed. The expensive full-screen localisation matrix is left to CI.
  • go vet ./... — passed.
  • make build — passed; local binary rebuilt.
  • node web/scripts/screenshots.mjs --check — passed after regenerating and visually checking all seven images.
  • Duplication ratchet — all four production scans passed with no metric increases.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain, with the supplied evidence indicating the duration formatting, width-aware rendering, stale-state handling, layout preservation, and related tests and documentation were addressed.

No open issues 🎉

What changed in this PR

Adds Codex-reported goal pursuit duration to terminal session labels and detail footers while preserving existing status, layout, stale-observation, and Copy control behavior.

Changes:

  • Formats timeUsedSeconds into compact day/hour/minute labels with sub-minute and large-counter handling.
  • Adds width-aware rendering with status and footer control preservation.
  • Updates tests, timing documentation, the Sessions screenshot fixture, and screenshot manifest metadata.
File Description
README.md Documents goal-duration semantics, formatting, and stale-observation behavior.
internal/​ui/​monitor.go Passes available session-row width to goal status rendering.
internal/​ui/​monitor_goal.go Formats and renders reported goal durations in terminal labels and detail footers.
internal/​ui/​monitor_goal_test.go Tests duration formatting, supported states, stale handling, width fallback, and Copy geometry.
internal/​ui/​documentation_screenshots_test.go Adds representative goal-duration data to the Sessions documentation scene.
assets/​screenshots/​manifest.json Updates synthetic screenshot metadata and image hashes.

Review effort: Lite

@merefield merefield changed the title FEAT: show goal pursuit duration beside terminal status FEAT: show goal pursuit duration and require patched Go 1.27.4 Nov 12, 2026
@merefield
merefield merged commit 0b0f559 into main Nov 12, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants