GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(pm-stack): scheduled-history collector — per-run history for OpenChamber scheduled tasks (#2174 Gap 1) by dezren39 · Pull Request #8437 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Nov 11, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Refs #2174 (Gap 1 of the evidence gaps; Gap 3 named as the follow-on on the issue).

Builds the per-run history consumer for OpenChamber scheduled tasks in pm-stack/scheduled-history/:

  • Design: a polling reconciler, not an event consumer — the scheduled-task-ran events are ephemeral and report enqueue/send rather than completion (recon on OpenCode scheduled tasks: migrate the Muse→OpenCode cron wrappers into OpenChamber scheduled tasks (waves, monitoring gates) #2174), so each tick polls openchamber schedule list --json and reconciles runs keyed by (task id, lastScheduledFor): exactly one durable row per run; outcome follows the record until terminal, then the row freezes; a newer run finalizes an older non-terminal row as superseded.
  • Store: ~/.local/state/openchamber-scheduled-history/history.json (atomic tmp+rename), rows carry task id/name, project, scheduled/start/finish, scheduler duration, session id, outcome + terminal flag, and token/cost totals enriched from the OpenCode session store (session_v2, the External-system observability: unified PM + queue + quota attribution (webhooks, hot list, session IDs, projections) #2072 source) by session id — null when absent, never invented.
  • Read path: collect.py list [--task] [--since] [--until] [--json] — the input the OpenCode scheduled tasks: migrate the Muse→OpenCode cron wrappers into OpenChamber scheduled tasks (waves, monitoring gates) #2174 comparison and the Gap 3 watchdog will consume.
  • Deployment: user systemd service+timer (5-minute tick) mirroring opencode-usage-export; installed and enabled on the laptop. The installed unit temporarily ExecStarts from this branch's worktree; reinstall from the primary clone after merge (the repo unit already carries the canonical ~/git/code path). No existing cron job, scheduled task, cadence, or lane count is changed.

Live verification (2026-11-11): first tick inserted 24 rows (one per code-project scheduled task's latest run), every row token-enriched (e.g. one run: input 1,199,142 / output 6,470 tokens, cost 0.192); second tick inserted 0 (idempotent). Tests: test_collect.py 13/13 (insert, dedupe, running→error transition, supersede-finalize, token enrichment present/absent, never-ran, store round-trip).

Queue: task 12585, lane code-v (resumed prior handoff branch queue/12585-2174-run-history).


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
repo-worker-code-k
feat(pm-stack): scheduled-history collector — per-run history for Ope…
044d40f
…nChamber scheduled tasks (#2174 Gap 1)
@dezren39
dezren39 requested a review from a team as a code owner November 11, 2026 02:27
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 58 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 02e3d1bd-c3fc-4d30-b1c2-e6a01c8edd6b
Commits

Reviewing files that changed from the base of the PR and between fa5548b and 3ffc41c.

Files selected for processing: 6

  • doc/fleet-schedule-registry.md
  • pm-stack/scheduled-history/README.md
  • pm-stack/scheduled-history/collect.py
  • pm-stack/scheduled-history/scheduled-history.service
  • pm-stack/scheduled-history/scheduled-history.timer
  • pm-stack/scheduled-history/test_collect.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-14T20:50:16.250346Z
We couldn’t complete this review. Comment @codex review to try again.
3ffc41c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Nov 11, 2026
OpenCode scheduled tasks: migrate the Muse→OpenCode cron wrappers into OpenChamber scheduled tasks (waves, monitoring gates) #2174
Open
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Nov 11, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 044d40f77a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/scheduled-history/collect.py Outdated
Comment on lines +170 to +173
if lookup is not None and row.get("tokens") is None and row.get("session_id"):
got = lookup(row["session_id"])
if got:
row.update(got)

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 11, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P1 Badge Refresh usage while the session is still accumulating tokens

When the first poll finds a session that is still running, this condition permanently freezes its current token counts, cost, and session_updated_at: every later poll skips the lookup because tokens is already non-null. This also affects sessions that outlive the scheduler’s terminal transition, explicitly acknowledged in the README, so long-running tasks can retain zero or partial usage indefinitely and corrupt the comparison/watchdog dataset. Refresh session enrichment on subsequent polls independently of the scheduler outcome.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Nov 14, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed in 3ffc41c (task 17227 shepherd pass) — see the merge-ready note on this PR for the per-finding disposition and the new regression checks in test_collect.py (19/19 pass).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/scheduled-history/scheduled-history.timer
Description=Run the scheduled-task history collector every 5 minutes — code#2174 Gap 1

[Timer]
OnCalendar=*:0/5

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 11, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P1 Badge Register the collector timer in the fleet schedule registry

This introduces a recurring laptop systemd schedule, but doc/fleet-schedule-registry.md has no entry for scheduled-history.timer, and this commit does not update the registry. Because the registry supplies the fleet placement audit’s inventory, this collector’s recurring work will be invisible to that review. Add its registry row in the same change, as required for new laptop timers.

AGENTS.md reference: AGENTS.md:L53-L58

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Nov 14, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed in 3ffc41c (task 17227 shepherd pass) — see the merge-ready note on this PR for the per-finding disposition and the new regression checks in test_collect.py (19/19 pass).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/scheduled-history/collect.py Outdated
Comment on lines +235 to +237
if args.since and started < args.since:
continue
if args.until and started > args.until:

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 11, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Compare parsed timestamps when filtering run history

When --since or --until uses an ISO timestamp with Z or a non-UTC offset, these string comparisons can include or exclude the wrong runs because stored timestamps always use +00:00. For example, a run starting at 2026-11-11T12:30:00+00:00 is excluded by --since 2026-11-11T13:00:00+01:00, even though that bound means 12:00 UTC. Parse and normalize both bounds and stored timestamps before comparing them so the documented inclusive time window operates on instants rather than their textual representations.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Nov 14, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed in 3ffc41c (task 17227 shepherd pass) — see the merge-ready note on this PR for the per-finding disposition and the new regression checks in test_collect.py (19/19 pass).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/scheduled-history/collect.py Outdated
Comment on lines +196 to +198
os.makedirs(os.path.dirname(path), exist_ok=True)
doc = {"schema": "scheduled-history/v1", "rows": rows}
fd, tmp = tempfile.mkstemp(dir=os.path.dirname(path), suffix=".tmp")

@chatgpt-codex-connector chatgpt-codex-connector Bot Nov 11, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Resolve bare store filenames before creating their directory

When the collector is invoked with a bare relative store filename, such as --store history.json collect --dir /project, os.path.dirname(path) returns an empty string and os.makedirs('') raises FileNotFoundError. Consequently this --store override never saves any collected history, even though the same path works with list. Normalize the store path or resolve its parent to . consistently for both directory creation and temporary-file placement.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@dezren39 dezren39 Nov 14, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Fixed in 3ffc41c (task 17227 shepherd pass) — see the merge-ready note on this PR for the per-finding disposition and the new regression checks in test_collect.py (19/19 pass).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot assigned dezren39 Nov 12, 2026
@dezren39

dezren39 commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

agent-note:v1
state: picked-up
task: 17227
lane: code-a
worker: repo-worker-code
What: Shepherding PR #8437 to a terminal outcome (90-day review open-PR pass). Verified fresh: PR #8437 OPEN, head 044d40f, no held / user/owned / do-not-merge / do-not-auto-edit labels; issue #2174 OPEN; the scheduled-history module is NOT on current main. Codex review completed WITH four unresolved findings (P1: token enrichment frozen at first poll for still-running sessions, collect.py:173; P1: timer not registered in doc/fleet-schedule-registry.md; P2: --since/--until string comparison breaks with Z/offset bounds, collect.py:237; P2: bare relative --store filename crashes directory creation, collect.py:198). Per the Codex findings gate, these must be dispositioned before any merge.
Next: fix all four findings in a dedicated worktree with tests, push, recheck, and merge on its merits.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 added work/assigned Queue worker lifecycle state queue/claimed Queue worker lifecycle state status/in-progress Queue worker lifecycle state labels Nov 14, 2026
repo-worker-tmp-code-b added 2 commits November 14, 2026 14:48
repo-worker-tmp-code-b
Merge remote-tracking branch 'origin/main' into shepherd-17227-8437
77dcbb2
repo-worker-tmp-code-b
fix(scheduled-history): refresh enrichment per poll, instant --since/…
3ffc41c
…--until, bare store filename, registry row (Codex P1/P2 on #8437)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39

dezren39 commented Nov 14, 2026

Copy link
Copy Markdown
Member Author

agent-note:v1
state: merge-ready
task: 17227
lane: code-a
worker: repo-worker-code
What: Merging PR #8437 on its merits, with all four Codex findings fixed in commit 3ffc41c (each finding thread also has a reply):

  • P1 collect.py enrichment freeze: the tokens-is-None gate is removed — session enrichment now refreshes on every poll while the session store has the row, independently of the outcome freeze (docstring + README updated to match). New checks: refresh first poll enriches; later poll updates tokens on a terminal row.
  • P1 timer registration: scheduled-history.timer row added to doc/fleet-schedule-registry.md section 2b (OnCalendar=--* *:0/5:00, activates scheduled-history.service, code#2174).
  • P2 --since/--until string comparison: bounds and stored timestamps are parsed to instants (parse_instant: Z and non-UTC offsets handled, naive read as UTC) and compared as datetimes; an unparseable bound is an error (exit 2). New checks cover offset and Z bounds.
  • P2 bare --store filename: save_store resolves the parent via os.path.abspath before makedirs/mkstemp. New check: bare relative filename round-trips.
    Verification: python3 pm-stack/scheduled-history/test_collect.py — 19/19 checks pass (13 pre-existing + 6 new). Current main merged cleanly before the fix commit; PR is MERGEABLE/CLEAN. Post-merge ops note from the PR body stands: the laptop unit currently ExecStarts from the original branch worktree — reinstall from the primary clone now that the canonical-path unit lands on main.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit 3c72e9c into main Nov 14, 2026
2 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the queue/12585-2174-run-history branch November 14, 2026 20:50
@dezren39 dezren39 removed status/in-progress Queue worker lifecycle state queue/claimed Queue worker lifecycle state work/assigned Queue worker lifecycle state labels Nov 14, 2026
@dezren39 dezren39 mentioned this pull request Nov 17, 2026
feat(scheduled-history): Gap 3 watchdog over OpenChamber run history (#2174) #11158
Merged
@dezren39 dezren39 added the audit:partial PR partially implemented; gap filed label Nov 24, 2026
This was referenced Nov 24, 2026
AUDIT-7 Lane 4 — MERGED-PR-AUDIT: merged PRs since 2026-10-23 vs their spawning issues #13879
Open
Muse→OpenCode cron wrapper inventory with dispositions (#2174 slice) #14222
Closed
This was referenced Nov 26, 2026
Migrate openchamber-conductor (dispatcher + babysitter successor) to OpenChamber scheduled tasks (#2174 wave 1) #15339
Open
Migrate new-issue-creator lanes to OpenChamber scheduled tasks (#2174 wave 1) #15340
Open
Complete the repo-queue worker shift migration to OpenChamber scheduled lanes (#2174 wave 1) #15341
Open
Migrate repo-fleet-monitor gathering half to an OpenChamber scheduled task (#2174 wave 2, partial) #15342
Open
Migrate pr-diff-review pair to draft-native OpenCode reviews (#2174 wave 2, partial) #15343
Open
Replace pool-quota-steward's Claude pass with a thin check over quota-gatherer output (#2174 wave 2, partial) #15344
Open
This was referenced Nov 26, 2026
Migrate the daily OpenCode launcher jobs (bolt-palette, daily-top-issue x2) to OpenChamber scheduled tasks (#2174 wave 2) #15345
Open
Assess main-ci-failure-fix-trigger for OpenChamber scheduled-task port (#2174 wave 2) #15346
Closed
dezren39 added a commit that referenced this pull request Nov 26, 2026
@dezren39
docs(15339): gating verification — conductor live state and #2174 gap…
6c3aa02
…s 2/4

Criteria 1-2 of #15339 verified 2026-11-26: all three Muse jobs
recorded disabled and absent from this seat's live scheduler (primary
seat unreachable, #15131); gap 1 closed (PR #8437), gap 3 closed
(PR #11158), gap 2 OPEN (#2072), gap 4 OPEN/unverified. Verdict: the
port stays gated until gaps 1-4 close. Registry rows re-reviewed in
the same pass; check_gating_record.py guards the record against
drift.
This was referenced Nov 26, 2026
docs: assess main-ci-failure-fix-trigger OpenChamber port — no-port for now (#15346) #15442
Merged
docs(15339): gating verification — conductor live state and #2174 gaps 2/4 #15457
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

audit:partial PR partially implemented; gap filed

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.