Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 6, 2025

This PR adds comprehensive GitHub Copilot instructions to help coding agents work effectively in the Endo repository, along with a setup workflow to address firewall restrictions that block engine installations.

Key Features

Validated Build Process: All commands have been tested and timed to ensure reliability:

  • Dependency installation: yarn install --immutable (~3 minutes)
  • Full build: yarn build (~12 seconds)
  • Core tests: SES package tests (~29 seconds)
  • Linting: yarn lint (~48 seconds)

Timeout Guidelines: Includes explicit "NEVER CANCEL" warnings with specific timeout recommendations to prevent premature build cancellation:

  • Build commands: 5+ minute timeouts
  • Test suites: 5-10+ minute timeouts
  • Documentation generation: 10+ minute timeouts

Validation Scenarios: Step-by-step workflows for testing changes including:

  • CLI functionality testing with the Endo daemon
  • Core package validation
  • Code quality checks

Known Issues Documentation: Documents expected failures like:

  • Benchmark engine installation fails due to firewall restrictions
  • Full test suite requires missing XS/V8 engines
  • These are normal and don't affect core functionality

Repository Overview: Comprehensive guide to the 44-package monorepo structure, highlighting key packages like ses (Hardened JavaScript), cli (command interface), daemon (persistent host), and captp (Capability Transfer Protocol).

Copilot Setup Steps: Added copilot-setup-steps.yml workflow to pre-install XS and V8 engines before firewall restrictions are applied. This addresses the blocked URLs that prevent engine installation:

  • https://api.github.com/repos/Moddable-OpenSource/moddable/releases (for XS engine)
  • https://storage.googleapis.com/chromium-v8/official/canary/v8-linux64-rel-latest.json (for V8 engine)

The setup workflow includes caching mechanisms and graceful fallbacks to ensure engine installation succeeds when possible, allowing coding agents to run the full benchmark test suite.

The instructions follow the imperative tone requirement and prioritize working, validated commands over theoretical guidance. Every command included has been manually tested to ensure it works correctly in the repository environment.

Fixes #2925.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] ✨Set up Copilot instructions Add GitHub Copilot instructions for Endo repository development Aug 6, 2025
Copilot finished work on behalf of turadg August 6, 2025 20:52
Copilot AI requested a review from turadg August 6, 2025 20:52
@turadg turadg requested a review from kriskowal August 6, 2025 21:32
@boneskull
Copy link
Member

Curious how this turns out. I'm trying the same in LavaMoat/LavaMoat#1756

@boneskull
Copy link
Member

boneskull commented Aug 15, 2025

According to above, we need to take one of these actions, presumably because Copilot's firewall blocks access to the archives needed in the "install engines" step:

  1. Configure Actions setup steps to set up my environment, which run before the firewall is enabled
  2. Add the appropriate URLs or hosts to the custom allowlist in this repository's Copilot coding agent settings (admins only)

The second implies HTTP access to all of GitHub, which I think is probably a Bad Idea. @turadg can you look into what's required to implement the first suggestion?

@turadg
Copy link
Member

turadg commented Aug 18, 2025

@copilot create the appropriate copilot-setup-steps.yml

Copy link
Contributor Author

Copilot AI commented Aug 18, 2025

@copilot create the appropriate copilot-setup-steps.yml

Created the copilot-setup-steps.yml file to address the firewall restrictions. The setup file pre-installs XS and V8 engines before the firewall is enabled, with proper caching and graceful fallbacks. This should resolve the blocked access to the Moddable and Chromium V8 repositories. Commit: dbc8afc

Copilot AI changed the title Add GitHub Copilot instructions for Endo repository development Add GitHub Copilot instructions and setup steps for Endo repository development Aug 18, 2025
Copilot AI requested a review from turadg August 18, 2025 17:30
Copilot finished work on behalf of turadg August 18, 2025 17:30
Copy link
Member

@kriskowal kriskowal left a comment

Choose a reason for hiding this comment

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

Largely looking for opportunities to DRY this up in cases where the human and machine instructions are or can be a source of truth to reduce drift under maintenance.

## Working Effectively

### Prerequisites and Setup
- **Node.js**: Requires Node.js >= 16. Tested with Node.js v20.19.4.
Copy link
Member

Choose a reason for hiding this comment

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

Is there a way to indicate a reference to the source of truth? In this case, the source of truth is the Github workflow.

Copy link
Member

Choose a reason for hiding this comment

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

yes but it would eat more context tokens. with LLM it helps to have the data denormalized. It's a little more work to keep in sync, but LLMs can do that too

Copy link
Member

Choose a reason for hiding this comment

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

That being the case, I’ll accept this duplication if we add a comment at the source of truth, so that we or our minions remember to update this document.

Comment on lines +11 to +12
- **Package Manager**: Uses Yarn 4.9.1 (managed via corepack)
- **Repository Structure**: Yarn workspaces monorepo with 44 packages
Copy link
Member

Choose a reason for hiding this comment

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

Likewise, can we make this less sensitive to drift under maintenance?

Copy link
Member

Choose a reason for hiding this comment

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

On the other hand, this number does not need to be specific and I don’t think we should need to update it when we add packages.

Suggested change
- **Package Manager**: Uses Yarn 4.9.1 (managed via corepack)
- **Repository Structure**: Yarn workspaces monorepo with 44 packages
- **Package Manager**: Uses Yarn 4.9.1 (managed via corepack)
- **Repository Structure**: Yarn workspaces monorepo with numerous packages under `packages/`.

@boneskull
Copy link
Member

@turadg I think you may need to instruct the clanker to apply @kriskowal's suggestions.

Copy link
Member

@turadg turadg left a comment

Choose a reason for hiding this comment

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

LGTM. When it gets @kriskowal 's approval I'll squash and merge

## Working Effectively

### Prerequisites and Setup
- **Node.js**: Requires Node.js >= 16. Tested with Node.js v20.19.4.
Copy link
Member

Choose a reason for hiding this comment

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

That being the case, I’ll accept this duplication if we add a comment at the source of truth, so that we or our minions remember to update this document.

Comment on lines +11 to +12
- **Package Manager**: Uses Yarn 4.9.1 (managed via corepack)
- **Repository Structure**: Yarn workspaces monorepo with 44 packages
Copy link
Member

Choose a reason for hiding this comment

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

On the other hand, this number does not need to be specific and I don’t think we should need to update it when we add packages.

Suggested change
- **Package Manager**: Uses Yarn 4.9.1 (managed via corepack)
- **Repository Structure**: Yarn workspaces monorepo with 44 packages
- **Package Manager**: Uses Yarn 4.9.1 (managed via corepack)
- **Repository Structure**: Yarn workspaces monorepo with numerous packages under `packages/`.

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.

✨Set up Copilot instructions

4 participants