Skip to content

Copilot/server protocols naming and navigation#9

Open
Pmaster-dev wants to merge 8 commits into
copilot/server-tasksfrom
copilot/server-protocols-naming-and-navigation
Open

Copilot/server protocols naming and navigation#9
Pmaster-dev wants to merge 8 commits into
copilot/server-tasksfrom
copilot/server-protocols-naming-and-navigation

Conversation

@Pmaster-dev

Copy link
Copy Markdown
Owner

Pre-requisites

  • Prior to submitting a new workflow, please apply to join the GitHub Technology Partner Program: partner.github.com/apply.

Please note that at this time we are only accepting new starter workflows for Code Scanning. Updates to existing starter workflows are fine.


Tasks

For all workflows, the workflow:

  • Should be contained in a .yml file with the language or platform as its filename, in lower, kebab-cased format (for example, docker-image.yml). Special characters should be removed or replaced with words as appropriate (for example, "dotnet" instead of ".NET").
  • Should use sentence case for the names of workflows and steps (for example, "Run tests").
  • Should be named only by the name of the language or platform (for example, "Go", not "Go CI" or "Go Build").
  • Should include comments in the workflow for any parts that are not obvious or could use clarification.
  • Should specify least privileged permissions for GITHUB_TOKEN so that the workflow runs successfully.

For CI workflows, the workflow:

  • Should be preserved under the ci directory.
  • Should include a matching ci/properties/*.properties.json file (for example, ci/properties/docker-publish.properties.json).
  • Should run on push to branches: [ $default-branch ] and pull_request to branches: [ $default-branch ].
  • Packaging workflows should run on release with types: [ created ].
  • Publishing workflows should have a filename that is the name of the language or platform, in lower case, followed by "-publish" (for example, docker-publish.yml).

For Code Scanning workflows, the workflow:

  • Should be preserved under the code-scanning directory.
  • Should include a matching code-scanning/properties/*.properties.json file (for example, code-scanning/properties/codeql.properties.json), with properties set as follows:
    • name: Name of the Code Scanning integration.
    • creator: Name of the organization/user producing the Code Scanning integration.
    • description: Short description of the Code Scanning integration.
    • categories: Array of languages supported by the Code Scanning integration.
    • iconName: Name of the SVG logo representing the Code Scanning integration. This SVG logo must be present in the icons directory.
  • Should run on push to branches: [ $default-branch, $protected-branches ] and pull_request to branches: [ $default-branch ]. We also recommend a schedule trigger of cron: $cron-weekly (for example, codeql.yml).

Some general notes:

  • This workflow must only use actions that are produced by GitHub, in the actions organization, or
  • This workflow must only use actions that are produced by the language or ecosystem that the workflow supports. These actions must be published to the GitHub Marketplace. We require that these actions be referenced using the full 40 character hash of the action's commit instead of a tag. Additionally, workflows must include the following comment at the top of the workflow file:
    # This workflow uses actions that are not certified by GitHub.
    # They are provided by a third-party and are governed by
    # separate terms of service, privacy policy, and support
    # documentation.
    
  • Automation and CI workflows should not send data to any 3rd party service except for the purposes of installing dependencies.
  • Automation and CI workflows cannot be dependent on a paid service or product.

Copilot AI and others added 8 commits July 1, 2026 00:39
…rator variables (#1)

Adds `src/automation/` — a pure-Python, event-driven automation
subsystem with no runtime dependencies beyond stdlib.

## Variables (`variables.py`)
- **`GeneratorVariable`**: lazy value production via generator factory;
idempotent `peek()`, `reset()`, and composition via `.map()` /
`.filter()` / `.take()` / `.chain()`
- **`VariableRegistry`**: named lookup store shared across automation
steps

## Components (`components.py`)
- **`Component`** (ABC): `execute(input_) → ComponentOutput` contract
with optional `validate` / `setup` / `teardown` hooks
- **`FunctionComponent`**: wraps any callable as a component without
subclassing
- **`ComponentRegistry`**: name-based registration, `run()` with
pre-execution validation, `run_pipeline()` for sequential chaining

## Engine (`engine.py`)
- **`AutomationEngine`**: purely call-driven (no threads, no listener) —
safe for FaaS environments
- `AutomationDefinition` binds trigger event types → component pipeline
+ variable references
- Variables are **peeked** into run metadata (not consumed), keeping
runs reproducible
- Before/after middleware hooks; hook exceptions are logged, not
swallowed
- `stats()` / `history()` for observability

```python
engine = AutomationEngine()

engine.register_fn("upper", lambda inp: inp.payload.upper())
engine.define_variable("seq", lambda: (f"id-{i}" for i in range(100)))

engine.define(AutomationDefinition(
    name="shout", triggers=["msg.received"], steps=["upper"], variables=["seq"]
))

results = engine.trigger_type("msg.received", payload="hello")
# results[0].status == RunStatus.SUCCESS
# results[0].outputs[-1].result == "HELLO"
```

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Pmaster-dev <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
…in CI (#2)

The Pyre workflow was failing before analysis started because
`facebook/pyre-action` transitively depended on deprecated
`actions/upload-artifact@v2`, which GitHub now blocks. This change
removes that dependency path and runs Pyre directly in the workflow.

- **Workflow dependency path cleanup**
- Removed
`facebook/pyre-action@60697a7858f7cc8470d8cc494a3cf2ad6b06560d` from
`.github/workflows/pyre.yml`.
  - Kept job trigger and permissions model intact.

- **Direct Pyre setup/execution**
  - Added `actions/setup-python@v5` with Python `3.11`.
- Added shell-based dependency installation (`pip`, optional
`requirements.txt`, `pyre-check`).
  - Replaced action invocation with `pyre check`.

- **Resulting CI behavior**
- Pyre now runs via first-party setup + explicit commands, avoiding
blocked transitive actions and keeping the check logic in-repo and
transparent.

```yaml
- name: Set up Python
  uses: actions/setup-python@v5
  with:
    python-version: '3.11'

- name: Install dependencies
  run: |
    python -m pip install --upgrade pip
    if [ -f requirements.txt ]; then
      pip install -r requirements.txt
    fi
    pip install pyre-check

- name: Run Pyre
  run: pyre check
```

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Pmaster-dev <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
…act (#3)

This PR implements the first phase of the ecosystem alignment plan by
documenting the `pinkycollie` + `Pmaster-dev` operating model and
introducing a reusable API contract for automation workflows. It
establishes a concrete source of truth in `server` for cross-org
orchestration and contract-driven integration.

- **Ecosystem inventory (cross-org map)**
- Added `docs/pinkycollie-ecosystem-inventory.md` with the six-layer
strategy:
    - org-level template hubs
    - standardized CI/CD lifecycle
    - framework/repo instance mapping
    - REST vs webhook decision rules
    - webhook bridge flow
    - versioned artifact locations
  - Captures ordered next actions to drive rollout across repos.

- **Shared automation API contract**
- Added `docs/openapi/automation.yaml` (OpenAPI 3.1) defining core
automation endpoints:
    - trigger events
    - manage automation definitions
    - inspect run history and aggregate stats
- Includes typed schemas for definitions, run results, status enums, and
stats to support consistent producer/consumer integration across repos.

- **Contract clarity improvements**
- Set environment-neutral server base URL (`/`) for deployment-specific
resolution.
- Tightened schema documentation for payload semantics and step/variable
identifier fields.

```yaml
paths:
  /automation/events/trigger:
    post:
      operationId: triggerAutomationEvent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TriggerEventRequest'
```

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Pmaster-dev <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
)

Repo had no dependency manifest, no gitignore, a stray image/PHP file,
empty placeholder dirs, and no documentation surface. Restructures into
a clean, deployable state with published docs.

## Removed
- `com.phlox.simpleserver_73.png`, `domnornalizer.php` — untracked stray
files
- `spec/`, `types/` — empty placeholder trees with no content

## Added
- **`.gitignore`** — Python (`__pycache__`, `.pyre/`, `.venv/`), PHP,
OS, Jekyll build artifacts
- **`requirements.txt`** — pinned deps derived from `auth/utils.py`
(`bcrypt`, `PyJWT`, `Flask`, `flask-jwt-extended`, `redis`)
- **`docs/`** — Jekyll source for GitHub Pages (Cayman theme):
  - `index.md` — module inventory landing page
- `guides/getting-started.md` — install, engine usage, auth utils, env
vars
- `api/automation.md` — full HTTP API reference mirroring the OpenAPI
spec
  - `_config.yml` — Jekyll/Pages config
- **`.github/workflows/ci.yml`** — pylint + pytest on push/PR to
`develop`/`main`
- **`.github/workflows/pages.yml`** — Jekyll build + `deploy-pages` on
push to `main`

## Updated
- **`README.md`** — CI/Pages badges, repo layout table, quick-start, env
var notes

## Activation
After merge: **Settings → Pages → Source → GitHub Actions**.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
This PR captures the behaviors called out in review thread `4595682762`
with focused regression tests, so the reviewed fixes remain enforced
across the automation package. The coverage targets the generator
variable, component registry, engine failure path, and package
quick-start import example.

- **Generator variable drain semantics**
- Adds coverage for the `peek()` + `collect()` interaction to ensure a
peeked value is preserved when draining the remaining sequence.

- **Component lifecycle and failure reporting**
- Verifies component replacement triggers teardown on the previously
registered instance.
- Verifies `FunctionComponent` surfaces traceback text when wrapped
callables fail.

- **Automation engine variable handling**
- Verifies missing declared variables fail the run instead of being
silently omitted from the metadata snapshot.

- **Package quick-start contract**
- Verifies the package docstring examples use `automation` imports
rather than a non-package `src.automation` path.

```python
variable = GeneratorVariable.from_iterable([1, 2, 3])

assert variable.peek() == 1
assert variable.collect() == [1, 2, 3]
```

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
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