Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 1 addition & 26 deletions .github/workflows/actions.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ workflows:
- 'haskell-actions/setup@v2.12.1'
'.github/workflows/codeql.yml':
- 'actions/checkout@v7.0.1'
- 'github/codeql-action@b96794f015dfd88f77b49b1c93e0fa7110f94c63'
- 'github/codeql-action@v4.38.1'
'.github/workflows/dependabot-automerge.yml':
- 'dependabot/fetch-metadata@v3.1.0'
'.github/workflows/governance.yml': []
Expand Down Expand Up @@ -122,11 +122,6 @@ dependencies:
commit: 'sha1-25dd0e34f4fe68f24cc83900b1fe3fe149efef98'
owner_id: 27347476
repo_id: 371068214
'docker/build-push-action@v7.3.0':
ref: 'v7.3.0'
commit: 'sha1-53b7df96c91f9c12dcc8a07bcb9ccacbed38856a'
owner_id: 5429470
repo_id: 241092383
'docker/build-push-action@v7.4.0':
ref: 'v7.4.0'
commit: 'sha1-c3c9e263c25d99ce0380d002d59b67737d91b0dc'
Expand All @@ -142,36 +137,16 @@ dependencies:
commit: 'sha1-dc802804100637a589fabce1cb79ff13a1411302'
owner_id: 5429470
repo_id: 306769011
'docker/setup-buildx-action@v4.3.0':
ref: 'v4.3.0'
commit: 'sha1-37fe631027851001ddb9b187196cc803df7f5f0e'
owner_id: 5429470
repo_id: 288485773
'docker/setup-buildx-action@v4.4.1':
ref: 'v4.4.1'
commit: 'sha1-f87e5991a6d7451dcb8d9637bfbc97413f497069'
owner_id: 5429470
repo_id: 288485773
'github/codeql-action@b96794f015dfd88f77b49b1c93e0fa7110f94c63':
ref: 'v4.38.0'
commit: 'sha1-b96794f015dfd88f77b49b1c93e0fa7110f94c63'
owner_id: 9919
repo_id: 259445878
'github/codeql-action@v4.38.0':
ref: 'v4.38.0'
commit: 'sha1-b96794f015dfd88f77b49b1c93e0fa7110f94c63'
owner_id: 9919
repo_id: 259445878
'github/codeql-action@v4.38.1':
ref: 'v4.38.1'
commit: 'sha1-1c5b675653bb5c22dbe9b12b556ec555138e09fd'
owner_id: 9919
repo_id: 259445878
'haskell-actions/setup@v2.12.0':
ref: 'v2.12.0'
commit: 'sha1-6037f33647c3f17758a2356c80fc4a53d7e0685d'
owner_id: 75048950
repo_id: 623796603
'haskell-actions/setup@v2.12.1':
ref: 'v2.12.1'
commit: 'sha1-0f8e8c99d88aeb3fbfd523f1ef2c6f762d10d64d'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/casket-pages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
name: GitHub Pages
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
# SPDX-FileCopyrightText: 2025 Jonathan D.A. Jewell
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
name: CodeQL Security Analysis
Expand Down Expand Up @@ -36,11 +35,11 @@ jobs:
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v3
uses: github/codeql-action/init@v4.38.1
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v3
uses: github/codeql-action/analyze@v4.38.1
with:
category: "/language:${{ matrix.language }}"
1 change: 0 additions & 1 deletion .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
#
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/governance.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
name: Governance
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/hypatia-scan.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
name: Hypatia Security Scan
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/instant-sync.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
# Instant Forge Sync - Triggers propagation to all forges on push/release
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/label-triage.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
name: Label Triage
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
name: Labels
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/language-policy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
name: Language Policy Enforcement
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/mirror.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
name: Mirror to Git Forges
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/publish-image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
# SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
name: OSSF Scorecard
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/secret-scanner.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
name: Secret Scanner
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/workflow-linter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# This workflow is managed by gh actions-lock.
# Prevention workflow - validates all workflows have proper security config
Expand Down
85 changes: 85 additions & 0 deletions docs/handoff/CI-EVIDENCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# CI evidence — oikosbot `main` @ c9637fb (#105), gathered 2026-09-25

Sandbox limitations when this was gathered: `gh run view --log-failed`, artifact
downloads and the `gh-actions-lock` extension binary all failed with EOF (blob
storage blocked). Code-scanning API returned 403. Evidence below comes from the
check-run **annotations** API and by re-running gate logic locally.

## Run IDs (push of #105)

| Workflow | Run | Result | Failing step |
|---|---|---|---|
| Workflow Security Linter | 36187443576 | failure | `Check SPDX headers` (exit 15) |
| Governance | 36187444802 | failure | `governance / Actions lockfile verify` → `Verify actions.lock (or SHA pins during the grace window)` |
| Hypatia Security Scan | 36187444852 | failure | `Block high and critical findings when requested` |
| CI, CodeQL, Pages, Mirror, Language Policy, Secret Scanner | — | success | — |

Earlier: #104 (dependabot bump) gave `startup_failure` on CI / Pages / Publish Image
because the lock didn't cover the bumped refs. #105 fixed that part.

## Exact annotations

- Linter: `Process completed with exit code 15.`
- Governance: `actions-lock gate: lockfile verification FAILED (exit 1). Regenerate with scripts/update-actions-lock.sh in the same PR as the uses: change.`
- Hypatia: `Hypatia found 1 current high or critical finding(s); see the SARIF artifact`

## Root causes and fixes (committed on `arena/01a0da74-oikosbot`)

### 1. SPDX linter: 15 of 15 workflows fail
`gh actions-lock` put `# This workflow is managed by gh actions-lock.` on line 1,
above the SPDX line, and a second copy below it. The linter checks `head -1` only.
**Fix:** SPDX goes back on line 1, followed by one marker line. Reproduced locally:
unfixed = exactly 15 errors (matching exit 15), fixed = pass.

### 2. Governance lockfile gate
- `codeql.yml` used `github/codeql-action/{init,analyze}@1c5b675… # v3` (that SHA is
actually v4.38.1, so the comment was wrong too), but `actions.lock` → `workflows` →
`codeql.yml` still listed `github/codeql-action@b96794…` (v4.38.0). The verifier
rejects a mismatch between a workflow's lock list and what it actually uses.
- Stale entries left behind by the dependabot bump:
`codeql-action@v4.38.0`, `codeql-action@b96794…`, `docker/build-push-action@v7.3.0`,
`docker/setup-buildx-action@v4.3.0`, `haskell-actions/setup@v2.12.0`.

**Fix:** `codeql.yml` now uses `@v4.38.1` (same ref as `ci.yml`, already locked).
The lock list is updated and the 5 stale entries are removed.

**Deliberately kept:** 8 entries that no workflow here reaches (`actions/checkout@3d3c42e…`,
`actions/cache@55cc834…`, `actions/upload-artifact@043fb46…`, `erlef/setup-beam@54075bc…`,
`ossf/scorecard-action`, `webfactory/ssh-agent`, `dtolnay/rust-toolchain`,
`editorconfig-checker`). These are the pinned actions *inside* the standards reusable
workflows. For example, `hypatia-scan-reusable.yml@da2c748` uses setup-beam@54075bc,
cache@55cc834 and upload-artifact@043fb46.

**Gate acceptance logic** (standards `scripts/update-actions-lock.sh` @ `874ffe58`, called
by `governance-reusable.yml@da2c748` line ~1286): it runs
`gh actions-lock --verify-local --json=valid,findings`. The lock is accepted if
`.valid == true`; advisory findings such as `sha-as-ref` are logged but don't fail it.
If `valid == false`, it is accepted only when **every** finding is `category == stale`
for a reusable-workflow dependency the workflow really references, and there is at
least one such finding. Anything else fails closed.

**Confidence:** high for the SPDX fix (reproduced exactly). Medium-high for the lock fix:
the authoritative verifier binary couldn't be downloaded here, so this is confirmed by
`tools/ci/lockcheck.sh` (a re-implementation) plus the gate's own logic. The first
merge to `main` is the real test.

### 3. Hypatia: 1 high/critical finding, **NOT diagnosed**
This has failed on every run since at least 2026-09-20, so it wasn't caused by the bumps.
We couldn't get the SARIF artifact or code-scanning alerts. Next steps: download the
`hypatia-scan-findings` artifact from run 36187444852, or look in the Security tab under
tool "Hypatia". Then either fix it or commit `.hypatia-baseline.json` +
`scripts/apply-baseline.sh` (schema `.machine_readable/hypatia-baseline.schema.json`
in standards). Committing a baseline makes the gate blocking against *unbaselined*
findings only.

## Re-run verification

pip install pyyaml # if missing
bash tools/ci/linter-verify.sh # runs workflow-linter.yml's run: steps verbatim + lockcheck
bash tools/ci/lockcheck.sh # actions.lock ↔ workflows consistency only

## Environmental facts
- **Only merges to `main` by the owner trigger Actions.** Pushes and PRs from agent
branches don't produce runs, so CI verification means merging.
- There is no Rust, Haskell or Elixir toolchain in the sandbox. Rust/Haskell changes can
only be verified in CI.
124 changes: 124 additions & 0 deletions docs/handoff/PROMPT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Handoff prompt — oikosbot

Copy everything between the marker lines into a new chat on `hyperpolymath/oikosbot`.

----- BEGIN PROMPT -----

You're continuing work on `hyperpolymath/oikosbot`. A previous session left a
handoff package **committed in the repo** at `docs/handoff/`. Read these first:

- `docs/handoff/CI-EVIDENCE.md`: run IDs, exact annotations, root causes, and the
estate lockfile gate's acceptance logic
- `docs/handoff/open-issues.txt`: all 7 open issue bodies, verbatim. These are the
acceptance criteria.
- `docs/handoff/standards-ref/`: DEED/K9 canon frozen at `hyperpolymath/standards@2479cf76`.
The standards Python tools are stored as `*.py.txt` because repo policy blocks new
`.py` files. To run them, copy both into a temp dir and rename them to `.py`
(`a2ml_to_deed` imports `deed_lint`).
- `tools/ci/linter-verify.sh`, `tools/ci/lockcheck.sh`: local re-verification.

## Hard facts (don't rediscover them)
1. **Only the owner's merges to `main` trigger Actions.** Agent pushes and PRs produce
no runs. "Verified in CI" means after the owner merges.
2. **There is no Rust, Haskell or Elixir toolchain in the sandbox.** Rust/Haskell changes
can only be verified in CI, so keep them small and reviewable. Say this plainly in PRs.
3. In the prior sandbox, Actions logs, artifacts and the `gh-actions-lock` binary
download all failed (EOF). Use the check-run **annotations** API instead:
`gh api repos/hyperpolymath/oikosbot/check-runs/<job_id>/annotations`.
4. Repo language policy blocks new `.py`, `.rb`, `.pl`, `.java` and `.kt` files. Put
Python inside bash heredocs, the way `workflow-linter.yml` does.

## Step 0: CI fixes (done on branch `arena/01a0da74-oikosbot`; confirm they merged)
- SPDX: `gh actions-lock` had pushed the SPDX line off line 1 in all 15 workflows.
- actions.lock: `codeql.yml` now uses `codeql-action@v4.38.1`. Its lock list is
corrected, and 5 superseded entries were pruned. Do **not** prune the 8 "unreachable"
entries; they cover the standards reusable workflows.
- Check with: `gh run list --branch main -L 15`. Workflow Security Linter and
Governance should be green. If Governance is still red, read its annotations. The
authoritative verifier is `gh actions-lock --verify-local --json=valid,findings`.
- **Still open: Hypatia** (1 high/critical finding, red since at least 2026-09-20,
not diagnosed). Get the `hypatia-scan-findings` artifact or the Security tab entry,
then fix it or commit a validated `.hypatia-baseline.json` + `scripts/apply-baseline.sh`.
Never baseline a real vulnerability just to go green. Report what the finding is.

## #12: taxonomy reconciliation, delivered as the DEED/K9 migration
**Owner ruling (2026-09-25): the DEED migration REPLACES the six `.a2ml` descriptiles
(`.machine_readable/descriptiles/{META,ECOSYSTEM,AGENTIC,NEUROSYM,PLAYBOOK,STATE}.a2ml`).
Don't land it alongside them.** Remove the `.a2ml` files in the same change that
introduces the `.deed`. Update every reference (grep for the filenames and for
`descriptiles/`), including `0-AI-MANIFEST.a2ml`, the Justfile, docs and policies.
Note that the issue body cites the stale path `.machine_readable/6a2/`.

Also settle the vocabulary: the #12 proposal makes NEUROSYM canonical (`wish`,
`externalities`, add `preventive`), and `policies/finding_taxonomy.ecl` already encodes
it. Confirm with the owner before flipping the direction.

What was measured with `standards-ref/.../a2ml_to_deed.py` (standards@2479cf76),
`--canonical-name oikosbot --beholding-chora '#u5"estate/chora"'`:
- `agentic`: **converts cleanly** (output must be named `<stem>_chora.deed`, e.g.
`oikosbot_chora.deed`, or the post-condition lint fails).
- `neurosym`: **FAIL-CLOSED: unknown section(s) ['finding-taxonomy']**. The family-4
mapping (`mappings/agentic-neurosym-playbook-to-repo-deed.adoc`) has no row for
`[finding-taxonomy]`. That blocks #12: it needs a **standards-side extension** to the
family-4 mapping and converter, or an explicit **owner ruling** on where the taxonomy
lives in the deed. Don't hand-roll an unmapped clause; the canon treats silent
re-homing as the failure mode.
- `playbook`: **FAIL-CLOSED: unknown section(s) ['datastore', 'local-dev', 'overview']**.
Same class of blocker (a second one).
- `meta-ecosystem`: must go through `full DIR`. `full` fails closed because there is
**no `CLADE.a2ml`** (family 1 is a prerequisite). `clade` mode on META rejects its
sections. `meta-ecosystem-to-repo-deed.adoc` §"open questions" also leaves open whether
the `[maintenance-axes]` triple stays in META. That is exactly #12's question.
- `state-scan STATE.a2ml`: `[critical-next-actions]` (9 rows) and `[maintenance-status]`
are journal content and are tombstoned under option B. **Ruling pending: standards#843.**
- The canon's ordering (`mappings/README.adoc`): the estate wave (6) comes **after
families 1–5 are green in CI**. Check standards' `deed-conformance.yml` status before
migrating. If 1–5 aren't green, stop and report.
- Contractiles (`.machine_readable/contractiles/*.a2ml`) → K9 (`*.k9.ncl`) is a separate
family. See `standards-ref/1-formats/k9/SPEC.adoc` and standards'
`.machine_readable/contractiles/*/*.k9.ncl` for the target layout. It isn't covered by
the replace ruling, so ask before touching it.

Deliverable: a standards-side issue or PR for the family-4 `[finding-taxonomy]` and
PLAYBOOK gaps (or the owner's ruling), then the oikosbot replacement PR once it's unblocked.

## #18: taxonomy tags through Rust `Finding`
Depends on #12's vocabulary decision. Add `intent` (derived from confidence),
`maintenance` and `locus` to the types in `crates/oikosbot-metrics`, populate them in
`crates/oikosbot-analysis`, and emit them in `crates/oikosbot-sarif` (SARIF `properties`)
and PR comments. Use enums, not strings. Can only be verified in CI.

## #48: wire calibration in
Follow the issue exactly, including its **Caution**: map `patterns.rs` detections onto
`OperationKind`, use `calibration::estimate_operation()` for recognised patterns, keep
`Estimated` for everything else, and propagate `ResourceRange`. Add the three falsifier
tests. Include before/after numbers in the PR. Since nothing compiles here, derive them
by reasoning and label them that way, or ask the owner to run it. Never relabel
estimates as Calibrated.

## #16 / #17: docs
#16: `docs/README.adoc` index first (quick win), per-crate READMEs,
`analyzers/code-haskell/README`, a CI runbook (use `CI-EVIDENCE.md`), and a `just`
target reference taken from the actual Justfile. #17: end-user guide. Define `BOT_MODE`
from the code, not by guessing. Document the SARIF shape from `crates/oikosbot-sarif`.
`DEPLOY.adoc` stays gated on AffineScript operational parity. AsciiDoc, matching the repo.

## #81: whole test/benchmark backlog
Work P0 → P1 → benchmarks, following the issue's Acceptance rules. Every analyzer rule
gets a paired silent/firing fixture. Validate SARIF against the 2.1.0 schema. Seeded
property tests. Split the work into several reviewable PRs and tick the issue's
checkboxes as each one merges.

## #82: close and re-file
It's a conditional policy with an unresolvable blocker (no canonical Hexadeca authority
exists; see the issue's last section), so it isn't actionable as a task. **Confirm with
the owner, then** close it with a comment linking the re-files: (a) a policy doc in-repo
(e.g. `docs/policies/interface-gating.adoc`) recording the Idris2/Zig/SNIF/Hexadeca
trigger conditions, and (b) an issue, standards-side if the owner agrees, to locate or
publish the Hexadeca authority. Keep #81 cross-referenced.

## Working rules
Commit only to the session branch you're given. Open PRs from it. Ask the owner when
the canon is silent rather than inventing structure.

----- END PROMPT -----
Loading
Loading