Skip to content

Add skill-lib governed dynamic repository SITREP - #41

Merged
erinepshovel-code merged 18 commits into
mainfrom
feature/dynamic-repo-sitrep
Aug 15, 2026
Merged

erinepshovel-code merged 18 commits into
mainfrom
feature/dynamic-repo-sitrep

Conversation

@erinepshovel-code

Copy link
Copy Markdown
Contributor

What

Adds a public /sitrep/ surface for METAPAT, UCNS, EDCM, a0, and the website itself.

Authority / provenance

  • consumes each repository's existing docs/work-graphs/repository-plan-report.json
  • validates/projects those reports by executing the exact pinned skill-lib/interdependent-work-graph/portfolio_plan.py
  • pins the frozen repository-plan-report schema blob and the portfolio script blob
  • keeps GitHub telemetry visually and structurally separate from repo-declared situation
  • never synthesizes a missing report; fallback is explicit
  • adds this website's own repository-plan-report under the same skill-lib contract

Public surfaces

  • /sitrep/ dynamic infograms
  • /assets/data/sitrep.json machine-readable presentation view
  • hourly Pages refresh plus existing repository_dispatch trigger

Validation

Adds authority/provenance tests and runs through the existing full site, browser, accessibility, generated-route, and link gates.

hmmm

Producer-side org-repo-updated dispatch is not yet installed across the participating repositories; hourly refresh provides bounded eventual update until that is deliberately selected.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8f47cc4424

ℹ️ 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".

Comment thread scripts/fetch-sitrep.mjs Outdated
try {
reportRecords.set(definition.repository, await collectReport(definition, workDir));
} catch (error) {
missingReports.push({ repository: definition.repository, reason: error.message });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Do not publish curl errors containing the GitHub token

When a repository-report request fails while GITHUB_TOKEN is set, Node's execFileSync error message includes the full curl arguments, including Authorization: Bearer .... Storing that raw message in missingReports exposes the credential through the generated assets/data/sitrep.json; the outer fallback path similarly publishes it as fallbackReason. Sanitize public errors or ensure the authorization value can never appear in captured command errors.

Useful? React with 👍 / 👎.

Comment thread scripts/fetch-sitrep.mjs

async function fallbackData(reason) {
try {
const previous = JSON.parse(await readFile('src/_data/snapshots/sitrep.last-known-good.json', 'utf8'));

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Persist the last-known-good snapshot across Pages runs

In the hourly Pages workflow, every build starts from a fresh checkout, but a repo-wide search shows src/_data/snapshots/sitrep.last-known-good.json is neither tracked nor recovered from the previous deployment. Therefore, if GitHub or skill-lib is temporarily unavailable before this run writes a fresh snapshot, this read always fails and the successful build deploys five empty project records over the previously good SITREP rather than using the advertised last-known-good data.

Useful? React with 👍 / 👎.

Comment thread scripts/fetch-sitrep.mjs Outdated
const sourceCommit = reportRecord?.report?.source?.commit || null;
const head = telemetry?.head || null;
let reportFreshness = 'unknown';
if (sourceCommit && head) reportFreshness = sourceCommit === head ? 'current' : 'stale';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Account for the report commit when computing freshness

When a report's source.commit identifies the repository state described by the report—as the newly added website report explicitly does—the report itself is committed afterward, so repository HEAD necessarily differs from that source commit. Direct equality consequently labels a freshly published report stale immediately, and another report-refresh commit cannot clear the label because it advances HEAD again; freshness needs to recognize report-only descendant commits or use the commit that contains the report.

Useful? React with 👍 / 👎.

Comment thread src/sitrep/index.njk
<div><dt>Workflow</dt><dd>{% if project.telemetry.latestWorkflow %}{{ project.telemetry.latestWorkflow.conclusion or project.telemetry.latestWorkflow.status or 'hmmm' }}{% else %}hmmm{% endif %}</dd></div>
</dl>
{% if project.telemetry.latestWorkflow %}
<div class="status-row"><span class="status {% if project.telemetry.latestWorkflow.conclusion == 'success' %}status-implemented{% elif project.telemetry.latestWorkflow.conclusion == 'failure' %}status-risk{% else %}status-hmmm{% endif %}">CI {{ project.telemetry.latestWorkflow.conclusion or project.telemetry.latestWorkflow.status }}</span></div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Tie the displayed CI result to the observed HEAD

When the latest workflow run belongs to an earlier commit or to an unrelated workflow, the template still labels its conclusion as CI success beside the repository's current HEAD. The collector already records latestWorkflow.headSha and the workflow name, but neither is checked or displayed here, so a new untested or failing HEAD can appear to have successful CI until another run becomes latest.

Useful? React with 👍 / 👎.

@erinepshovel-code
erinepshovel-code merged commit 66b1684 into main Aug 15, 2026
5 checks passed

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6d01bec47e

ℹ️ 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".

Comment thread scripts/fetch-sitrep.mjs
Comment on lines +134 to +137
const pulls = tryGetJson(githubApiUrl(`/repos/${encodeURIComponent(org)}/${encodeURIComponent(definition.name)}/pulls`, {
state: 'open',
per_page: 100
})) || [];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve unknown state when pull telemetry fails

When the repository and commit requests succeed but the /pulls request is unavailable or rate-limited, tryGetJson(...) || [] converts that failure into an empty list, causing the public SITREP to report Open PRs: 0 rather than an unavailable value. Keep the failure as null so a telemetry outage cannot be presented as evidence that the repository has no open pull requests.

Useful? React with 👍 / 👎.

Comment thread scripts/fetch-sitrep.mjs
sourceSnapshotAt: null,
controlPlane,
portfolio: null,
missingReports: projectDefinitions.map(project => project.repository),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep fallback missing-report records schema-compatible

When a total refresh failure occurs before any snapshot exists, this fallback emits missingReports as repository-name strings, while the normal collection path emits objects containing repository and reason. Because both payloads advertise the same schema/version at the public machine-readable route, consumers that read entry.repository will break precisely during the first-run outage scenario; emit the same record shape in both modes.

Useful? React with 👍 / 👎.

Comment thread src/sitrep/index.njk
<div><dt>Schema blob</dt><dd><code>{{ generated.sitrep.controlPlane.reportSchemaBlob | truncate(12, true, '') }}</code></dd></div>
<div><dt>skill-lib commit</dt><dd><code>{{ generated.sitrep.controlPlane.commit | truncate(12, true, '') }}</code></dd></div>
<div><dt>Projection</dt><dd>{% if generated.sitrep.portfolio %}<code>{{ generated.sitrep.portfolio.portfolio_plan_sha256 | truncate(12, true, '') }}</code>{% else %}<span class="status status-hmmm">hmmm</span>{% endif %}</dd></div>
<div><dt>Snapshot</dt><dd>{{ generated.sitrep.snapshotAt | dateOnly }}</dd></div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Display the retained snapshot's actual timestamp

When fallback data is loaded from a retained snapshot, fallbackData sets snapshotAt to the current refresh attempt and stores the data's real age in sourceSnapshotAt, but this page displays only snapshotAt. The fallback banner therefore accompanies a misleadingly current “Snapshot” date even though all repository claims and telemetry may be much older; use sourceSnapshotAt for this field whenever fallback is active.

Useful? React with 👍 / 👎.

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