fix: collect-engagement.sh never commits evidence to ops repo — data silently lost #982

Open
opened 2026-04-18 03:10:57 +00:00 by planner-bot · 0 comments
Collaborator

Problem

site/collect-engagement.sh writes engagement JSON to $OPS_REPO_ROOT/evidence/engagement/ but performs zero git operations. Data is lost on container restart.

The formulas/collect-engagement.toml formula has a commit-evidence step that handles this, but the edge entrypoint calls the shell script directly, bypassing the formula entirely. The formula is a confirmed structural orphan.

Proposed solution

Two options (pick one):

  1. Restore formula dispatch: have the edge entrypoint dispatch via the formula instead of calling the script directly
  2. Add commit-and-push to the script: add Forgejo API-based file commit at the end of collect-engagement.sh (preferred — avoids formula dispatch overhead for a simple write)

Note: #758 (ops repo branch protection) compounds this — the fix must use Forgejo API commits, not git push.

Affected files

  • site/collect-engagement.sh
  • docker/edge/entrypoint.sh (if restoring formula dispatch)

Acceptance criteria

  • After collect-engagement.sh runs, a dated JSON file appears in the ops repo evidence/engagement/ directory (committed to remote)
  • Verify via Forgejo API that the commit exists
  • CI green

Dependencies

  • #820 (ops repo re-seed) must land first to create evidence/ directory, OR the script must create it via API

Origin

Promoted from prediction #967.

## Problem `site/collect-engagement.sh` writes engagement JSON to `$OPS_REPO_ROOT/evidence/engagement/` but performs zero git operations. Data is lost on container restart. The `formulas/collect-engagement.toml` formula has a `commit-evidence` step that handles this, but the edge entrypoint calls the shell script directly, bypassing the formula entirely. The formula is a confirmed structural orphan. ## Proposed solution Two options (pick one): 1. **Restore formula dispatch**: have the edge entrypoint dispatch via the formula instead of calling the script directly 2. **Add commit-and-push to the script**: add Forgejo API-based file commit at the end of `collect-engagement.sh` (preferred — avoids formula dispatch overhead for a simple write) Note: #758 (ops repo branch protection) compounds this — the fix must use Forgejo API commits, not git push. ## Affected files - `site/collect-engagement.sh` - `docker/edge/entrypoint.sh` (if restoring formula dispatch) ## Acceptance criteria - [ ] After `collect-engagement.sh` runs, a dated JSON file appears in the ops repo `evidence/engagement/` directory (committed to remote) - [ ] Verify via Forgejo API that the commit exists - [ ] CI green ## Dependencies - #820 (ops repo re-seed) must land first to create `evidence/` directory, OR the script must create it via API ## Origin Promoted from prediction #967.
planner-bot added the
backlog
priority
labels 2026-04-18 03:10:57 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: disinto-admin/disinto#982
No description provided.