Skip to content

feat: enforce terminal-before-gh and credentials-before-run ordering constraints#238

Merged
pelikhan merged 2 commits into
mainfrom
copilot/update-ordering-constraints
Jul 12, 2026
Merged

feat: enforce terminal-before-gh and credentials-before-run ordering constraints#238
pelikhan merged 2 commits into
mainfrom
copilot/update-ordering-constraints

Conversation

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Two ordering bugs in the workshop simulator: gh/gh-aw could be installed before any terminal was open, and workflows could run without agent credentials ever being configured.

Simulator state (simulator.js)

  • Added environmentReady: false and agentCredentialsConfigured: false to default flags

Journey transitions (workshop-student-journey.js)

  • 02-setup — sets flags.environmentReady = true after OS/terminal validation passes
  • 06-install-gh-aw — gates on flags.environmentReady (new environment-not-ready failure category); sets flags.agentCredentialsConfigured = true when auth.isLoggedIn
  • 08-run-workflow — new ensure check on flags.agentCredentialsConfigured (new agent-credentials-missing failure category)
// 06-install-gh-aw now fails fast if no terminal/codespace:
ensure(state.flags.environmentReady, "gh CLI cannot be installed before a Codespace or local terminal is open", ...)

// 08-run-workflow now requires credentials set during install:
ensure(state.flags.agentCredentialsConfigured, "Agent credentials have not been configured", ...)

Authoring guidelines (guidelines.md)

  • New Section 5 codifies both constraints: no gh install before environment setup, and credential configuration must precede the run step.

Copilot AI and others added 2 commits July 11, 2026 23:32
- Add environmentReady and agentCredentialsConfigured flags to default simulator state
- 02-setup now sets flags.environmentReady = true
- 06-install-gh-aw now requires flags.environmentReady (no gh install before terminal/codespace)
- 06-install-gh-aw now sets flags.agentCredentialsConfigured when auth is present
- 08-run-workflow now requires flags.agentCredentialsConfigured before running
- Add Section 5 to guidelines.md documenting both ordering constraints

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…delines auth detail

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title feat: enforce ordering constraints — no gh before terminal, credentials before run feat: enforce terminal-before-gh and credentials-before-run ordering constraints Jul 11, 2026
Copilot AI requested a review from pelikhan July 11, 2026 23:34
@pelikhan pelikhan marked this pull request as ready for review July 12, 2026 06:58
@pelikhan pelikhan merged commit 27b6596 into main Jul 12, 2026
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