Skip to content

ci(watch): add overnight fork patrol - #5

Merged
Fearvox merged 3 commits into
mainfrom
codex-watch-overnight-2026-05-13
May 13, 2026
Merged

Fearvox merged 3 commits into
mainfrom
codex-watch-overnight-2026-05-13

Conversation

@Fearvox

@Fearvox Fearvox commented May 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • add an overnight fork patrol workflow for Fearvox/EverOS
  • check fork/upstream drift, watch-branch presence, recent workflow failures, and updated PRs
  • open/update public-safe tracking issues on FLAG and mirror them directly to Linear when LINEAR_API_KEY is available
  • document the fork-playground watch lane and manual dry-run path

Verification

  • node --check .github/scripts/overnight-watch.mjs
  • ruby -e 'require "yaml"; YAML.load_file(".github/workflows/overnight-watch.yml"); puts "YAML ok"'
  • git diff --check
  • dry-run: CREATE_TRACKING_ISSUE=false node .github/scripts/overnight-watch.mjs returned exit 0 with expected FLAG from existing workflow failures

Notes

  • Repo variables are set on Fearvox/EverOS: REPO_OWNER, REPO_NAME, WATCH_BRANCH, OWNER_TIMEZONE, LINEAR_TEAM_ID, LINEAR_PROJECT_ID.
  • LINEAR_API_KEY already exists as a repo secret.
  • Schedule activates only after this workflow lands on the default branch.

Copilot AI review requested due to automatic review settings May 13, 2026 06:26
@Fearvox
Fearvox merged commit fe80ca1 into main May 13, 2026
1 check passed
@Fearvox
Fearvox deleted the codex-watch-overnight-2026-05-13 branch May 13, 2026 06:29

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.

Pull request overview

Adds an automated “overnight fork watch” for the Fearvox/EverOS fork to monitor upstream drift, presence of a watch branch, recent workflow failures, and recently updated PRs; when issues are detected, it can open/update a tracking GitHub issue and mirror it to Linear.

Changes:

  • Introduces a scheduled + manually-dispatchable GitHub Actions workflow to run the overnight watch.
  • Adds a Node.js script that gathers git/GitHub state, renders a public-safe report, and (optionally) creates/updates a labeled tracking issue and mirrors to Linear.
  • Documents expected behavior plus a local/manual run path for the fork-playground lane.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
docs/fork-playground/overnight-watch.md Adds documentation for what the overnight watch checks, tracking behavior, and manual execution.
.github/workflows/overnight-watch.yml Adds the scheduled/dispatch workflow wiring, permissions, and environment configuration for the watch.
.github/scripts/overnight-watch.mjs Implements the watch logic, report rendering, issue creation/updating, and Linear mirroring.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

const linearIssue = data.data.issueCreate.issue;
const marker = `Linear: [${linearIssue.identifier}](${linearIssue.url})\n\n_Auto-created by overnight-watch._`;
Comment on lines +104 to +113
const runs = ghJson(
`/repos/${repoSlug}/actions/runs?per_page=50&status=completed`,
).workflow_runs || [];
const failedRuns = runs
.filter((runInfo) => new Date(runInfo.created_at) >= since)
.filter((runInfo) =>
["failure", "cancelled", "timed_out"].includes(runInfo.conclusion),
)
.slice(0, 10);

};

const repoSlug = `${config.repoOwner}/${config.repoName}`;
const recentWindowHours = Number(process.env.WATCH_WINDOW_HOURS || 24);
Comment on lines +14 to +18
watch_branch:
description: "Fork playground branch to verify on origin"
required: false
type: string
default: "codex-watch-overnight-2026-05-13"
Comment on lines +8 to +11
- `origin/main` drift against `EverMind-AI/EverOS` `upstream/main`.
- Whether the active playground branch exists on the fork:
`codex-watch-overnight-2026-05-13`.
- Failed, cancelled, or timed-out fork workflow runs in the last 24 hours.
@Fearvox
Fearvox restored the codex-watch-overnight-2026-05-13 branch May 13, 2026 06:30
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