Skip to content

feat(domain): explain why an element has its status - #32

Merged
Mearman merged 3 commits into
mainfrom
feat/domain-explain
Oct 11, 2026
Merged

Mearman merged 3 commits into
mainfrom
feat/domain-explain

Conversation

@Mearman

@Mearman Mearman commented Oct 10, 2026

Copy link
Copy Markdown
Member

Adds explainStatus(model, overlay, facts, id) to graph-domain: the rule of the status table that decided an element's status, the incoming transitions and consumed artefacts it was decided from, and the blocked-by chain (every unfinished need reached from the element, each with what it still waits on). The derivation records this basis as it derives each status, so the explanation is never a second derivation and always agrees with deriveStatuses and blockedBy.

The CLI's why <id> command (the graph-cli PR stacked on this one) is built on it, and Switchboard can serve the same explanation without the CLI.

Also fixes blockedBy, which reported blockers for an element the overlay marked done ahead of its needs, and for a skipped element consuming an artefact still to be made; its contract already said both are blocked by nothing.

@Mearman
Mearman marked this pull request as ready for review October 10, 2026 21:41
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-10-10T23:50:11.965724Z 9279367 Manual request
ℹ️ 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.

@Mearman

Mearman commented Oct 10, 2026

Copy link
Copy Markdown
Member Author

@codex security review

@Mearman
Mearman force-pushed the feat/domain-explain branch from 00d389d to 784a0b3 Compare October 10, 2026 23:45
@Mearman

Mearman commented Oct 10, 2026

Copy link
Copy Markdown
Member Author

@codex security review

blockedBy followed an element's unfinished needs whatever its own status, so an element the
overlay marked done ahead of its needs, or a skipped element consuming an artefact still to be
made, reported blockers. Its contract says a done or skipped element is blocked by nothing; it
now returns an empty list for both.
explainStatus names the rule of the status table that decided an element's status, the incoming
transitions and consumed artefacts it was decided from, and the blocked-by chain: every
unfinished need reached from the element with the needs each still waits on. The derivation
records this basis as it derives each status, so an explanation never re-derives it and always
agrees with deriveStatuses and blockedBy, which now share one waitingOn helper.
StatusBasis is the shape the derivation records for each element, and the fields of a status
explanation are drawn from it, so a consumer can name it.
@Mearman
Mearman force-pushed the feat/domain-explain branch from 784a0b3 to 9279367 Compare October 10, 2026 23:47
@Mearman

Mearman commented Oct 10, 2026

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 9279367c4f

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@Mearman
Mearman merged commit 036d161 into main Oct 11, 2026
14 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant