Skip to content

fix(observability): expose GitHub question receipt and rejection counters - #483

Merged
kjgbot merged 1 commit into
mainfrom
fix/question-counter-heartbeat-0906
Sep 6, 2026
Merged

fix(observability): expose GitHub question receipt and rejection counters#483
kjgbot merged 1 commit into
mainfrom
fix/question-counter-heartbeat-0906

Conversation

@kjgbot

@kjgbot kjgbot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

GitHub question counters were available only in the running Factory object, so the heartbeat reader could not distinguish an unseen question from one rejected before parking. Add an optional six-field questionCounters heartbeat block and increment githubAgentQuestionsReceived at handler entry, before any early return. The block carries received, detected, and the four existing rejection counts; only the authoritative daemon supplies zero defaults. Existing startedAt dates the daemon lifetime. Public health and parking/trust behavior are unchanged.

These are process-wide diagnostic totals, not per-issue receipts or an exhaustive partition: detected increments after parking; deduplication and reservation refusal have separate behavior. Companion https://github.com/AgentWorkforce/factory-cloud/pull/125 projects the block through authenticated /evidence. Availability in production requires a normal reviewed release and subsequent cloud version pin; this PR does not publish or deploy.

Validation:

  • Added tests first. Baseline: 6 failed, 1 passed. Zero producer/reader check: AssertionError: expected undefined to deeply equal { …(6) }. Each of the five real handler outcomes failed with AssertionError: expected undefined to be 1 for Received.
  • The legacy absence control was red-checked with a deliberately invented reader block: 1 failed, AssertionError: expected true to be false on the block's own-property check. Mutation restored.
  • 7 targeted tests pass: authoritative zero, legacy absence, and receipt plus heartbeat roundtrip for successful parking and all four rejections. They also check the daemon start timestamp and exclusion from public health.
  • Six actual heartbeat files produced by these fixtures (zero, parked, and four rejections) also pass through the companion cloud reader and JSON serialization with exact counts and start timestamp. The unchanged reader fails all six: AssertionError [ERR_ASSERTION]: 6 producer/consumer roundtrips failed.
  • TypeScript production compilation, build metadata generation, and feature map check pass. Packed consumer verification passes 12 checks, bound to 556f97e4f744416ef24e71ef58785646fe1a7129.
  • Full local suite: 2,554 passed, 1 failed, 1 skipped. The existing keeps the live heartbeat fresh while draining a blocking live event burst fails locally (expected 800 to be less than 500). Re-running that test with the base production module at 9934a1ac also fails its stale-heartbeat assertion (expected true to be false); head fails the age assertion again. Both base and head exhibit this local timing failure; the full local run is not green.
  • Branch CI completed successfully for 556f97e4f744416ef24e71ef58785646fe1a7129, confirmed with gh run list --branch fix/question-counter-heartbeat-0906. All four E2E jobs and the package job passed, including its full suite and packed lifecycle verification on CI Node 22. The local timing failure above remains disclosed. No independent review signoff is claimed.

…nters

Session-Id: 01a077a1-b1e7-7442-a74b-1a7e2adaeab2
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review

Requested for exact head 556f97e4f744416ef24e71ef58785646fe1a7129.

@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 7055c6dc-fe8a-4019-a1cb-f1d00addf215


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

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 3 files

Re-trigger cubic

@kjgbot
kjgbot merged commit 627cbcf into main Sep 6, 2026
8 checks passed
@kjgbot
kjgbot deleted the fix/question-counter-heartbeat-0906 branch September 6, 2026 17:26
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.

1 participant