Skip to content
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
30 changes: 30 additions & 0 deletions .agentic-prompts/ci-ops-runbook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Antigravity CI Ops Runbook

This runbook encodes the operational guardrails for the Summit CI/CD pipeline as managed by the Antigravity Operator.

## 1. Workflow Budget Rules
To prevent queue saturation and maintain velocity, the following limits apply per PR:
- **Total Workflows**: ≤ 12
- **Active (Auto-Running)**: ≤ 8
- **Path Filtering**: MANDATORY for all functional workflows.

## 2. Saturation Playbook (HEALTHY → GRIDLOCK)

| Status | Queue Depth | Action |
|--------|-------------|--------|
| **HEALTHY** | < 50 jobs | Proceed with all planned verifications. |
| **ELEVATED** | 50-100 jobs | Prioritize unit tests; defer heavy E2E or security scans. |
| **CRITICAL** | 100-200 jobs | Run ONLY changed packages; skip full-workspace builds. |
| **GRIDLOCK** | > 200 jobs | **STOP**. Cancel all non-essential runs. Post status update to Slack. |

## 3. Path-Filter Patterns
Always use the most granular path filters possible:
- `client/**` -> Client CI only.
- `server/**` -> Server CI only.
- `packages/shared/**` -> Full cascade required.

## 4. Emergency Procedures
If the queue exceeds 300 jobs (Fan-out Failure):
1. **Kill Switch**: `gh run cancel` for all non-main branches.
2. **Path Hardening**: Tighten filters to exclude `docs/` and `experimental/`.
3. **Escalation**: Notify @on-call-devops.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Summit Sprint 25+ Strategic Work — Next Priority Prompt

You are an autonomous agent assigned to Sprint 25+ for the BrianCLong/summit platform. The current system consists of:

- Full stack enterprise platform (React UI, Node/Express + GraphQL backend, Neo4j/PostgreSQL/TimescaleDB, Redis)
- Background orchestration with Maestro
- Golden Path CI (lint, smoke, quality gates)
Expand All @@ -12,24 +11,20 @@ Your mission this sprint is to concretely deliver the following prioritized work
## Deliverables

### 1. **Provenance & Lineage System**

- Extend the data model to capture **full data/AI provenance** for ingested telemetry, AI inferences, and analytic outputs.
- Implement an **immutable event log** (append-only) in TimescaleDB + Neo4j for traceability.
- Provide API endpoints and UI components to visualize provenance graphs centered on entity lifecycle.

### 2. **Predictive Analytics Module**

- Define schema and ingestion pipeline for predictive telemetry features (time series, anomaly scores, forecasting).
- Build a service module for **forecasting outcomes** (e.g., suspicious activity, entity risk score) using modular plug-in ML models with versioned metadata.
- Expose GraphQL queries tailored for predictive analytics and integrate them into the React UI dashboards.

### 3. **Agent-Driven Test Data Generator**

- Create a modular generator service that produces **realistic synthetic data** for key Summit domains (entities, events, metrics).
- Ensure generated data exercises **edge cases** and triggers CI test coverage across backend, API, and analytics layers.

### 4. **Governance & Policy Automation**

- Encode governance rules in machine-readable policies (e.g., Open Policy Agent) for:
• Data access
• CI pipeline enforcement
Expand All @@ -38,25 +33,21 @@ Your mission this sprint is to concretely deliver the following prioritized work
- Implement automated enforcement and reporting hooks tied into the Golden Path CI.

### 5. **Golden Path CI Enhancements**

- Expand automated quality gates with:
• Security scanning for new dependencies
• ML model evaluation benchmarks
• Provenance completeness validation
- Update CI workflows with policy checks and automated rollback triggers on failure.

## Requirements & Constraints

- All deliverables must pass the Golden Path (`make smoke`) end-to-end test.
- Updates must include unit, integration, and governance policy tests.
- Deliverables must include **schema migration plans** and performance considerations.
- All APIs must be documented with schema and usage examples.
- Agent prompts and workflows must be captured in versioned prompt files under `.agentic-prompts/`.

## Outputs

For each deliverable:

1. A clear **task list** broken down into atomic work units (ready for sprint planning).
2. Proposed **APIs / schemas / UI designs** draft (Markdown + JSON/YAML).
3. **Testing blueprint** covering edge cases and golden path criteria.
Expand All @@ -65,5 +56,4 @@ For each deliverable:
Start with a concise summary of design decisions (architecture, data flow, governance alignment) and then produce structured work items ready for PRs.

---

**Status**: Executed. Plan generated in `docs/sprints/sprint_25_plan.md`.
Original file line number Diff line number Diff line change
Expand Up @@ -16,33 +16,28 @@ Resolve all Jest ESM/CommonJS configuration mismatches for 100% passing tests.
## ✅ REQUIREMENTS

### 1. Create TypeScript Test Configuration

- [ ] Create `tsconfig.test.json` with CommonJS module settings
- [ ] Set `module: "commonjs"` for Jest compatibility
- [ ] Extend from base `tsconfig.json`
- [ ] Configure paths for test files

### 2. Update Jest Configuration

- [ ] Modify `jest.config.ts` to use `tsconfig.test.json`
- [ ] Configure proper ESM transform settings
- [ ] Remove `transformIgnorePatterns` warnings
- [ ] Enable correct preset for TypeScript + ESM

### 3. Fix Mock Implementations

- [ ] Fix `server/tests/mcp-client.test.ts` mock types
- [ ] Ensure mock return values match expected types
- [ ] Update all test files with `import.meta` errors

### 4. Update CI Workflow

- [ ] Modify `.github/workflows/ci-main.yml` to use test config
- [ ] Add explicit `--project tsconfig.test.json` flag
- [ ] Verify CI uses correct configuration

### 5. Validate All 510 Test Files

- [ ] Run full test suite: `pnpm test`
- [ ] Ensure zero failures
- [ ] Verify no ESM/CommonJS warnings
Expand All @@ -52,13 +47,11 @@ Resolve all Jest ESM/CommonJS configuration mismatches for 100% passing tests.
## 📦 OUTPUT FILES

### New Files

```
tsconfig.test.json
```

### Modified Files

```
jest.config.ts
server/tests/mcp-client.test.ts
Expand All @@ -71,7 +64,6 @@ package.json (if test scripts need updates)
## 🧪 VALIDATION CRITERIA

### Must All Pass:

```bash
pnpm test # ✅ 0 failures, all tests passing
pnpm typecheck # ✅ 0 errors
Expand All @@ -80,7 +72,6 @@ pnpm build # ✅ Success
```

### Specific Checks:

- ✅ No "import.meta not allowed" errors
- ✅ No mock implementation type errors
- ✅ No transformIgnorePatterns warnings
Expand All @@ -103,30 +94,39 @@ pnpm build # ✅ Success
"resolveJsonModule": true,
"types": ["jest", "node"]
},
"include": ["**/*.test.ts", "**/*.test.tsx", "**/*.spec.ts", "**/*.spec.tsx"]
"include": [
"**/*.test.ts",
"**/*.test.tsx",
"**/*.spec.ts",
"**/*.spec.tsx"
]
}
```

### Step 2: Update `jest.config.ts`

```typescript
import type { Config } from "jest";
import type { Config } from 'jest';

const config: Config = {
preset: "ts-jest",
testEnvironment: "node",
roots: ["<rootDir>/server", "<rootDir>/packages"],
testMatch: ["**/*.test.ts", "**/*.spec.ts"],
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/server', '<rootDir>/packages'],
testMatch: ['**/*.test.ts', '**/*.spec.ts'],
globals: {
"ts-jest": {
tsconfig: "tsconfig.test.json",
'ts-jest': {
tsconfig: 'tsconfig.test.json',
useESM: false,
},
},
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/server/src/$1",
'^@/(.*)$': '<rootDir>/server/src/$1',
},
collectCoverageFrom: ["server/src/**/*.ts", "!server/src/**/*.d.ts", "!server/src/**/*.test.ts"],
collectCoverageFrom: [
'server/src/**/*.ts',
'!server/src/**/*.d.ts',
'!server/src/**/*.test.ts',
],
coverageThreshold: {
global: {
branches: 70,
Expand All @@ -149,11 +149,11 @@ const mockClient = {
};

// After (fixed with correct types):
import { McpClient } from "../types";
import { McpClient } from '../types';

const mockClient: jest.Mocked<Pick<McpClient, "request">> = {
const mockClient: jest.Mocked<Pick<McpClient, 'request'>> = {
request: jest.fn().mockResolvedValue({
result: {} as Record<string, unknown>,
result: {} as Record<string, unknown>
}),
};
```
Expand Down Expand Up @@ -183,7 +183,6 @@ const mockClient: jest.Mocked<Pick<McpClient, "request">> = {
## 🚀 EXECUTION STEPS

1. **Create branch:**

```bash
git checkout main
git pull origin main
Expand All @@ -197,7 +196,6 @@ const mockClient: jest.Mocked<Pick<McpClient, "request">> = {
- Update CI workflow

3. **Validate locally:**

```bash
pnpm typecheck # Must pass
pnpm lint # Must pass
Expand All @@ -206,7 +204,6 @@ const mockClient: jest.Mocked<Pick<McpClient, "request">> = {
```

4. **Commit and push:**

```bash
git add .
git commit -m "🤖 Fix #11847: Resolve Jest ESM configuration
Expand All @@ -233,7 +230,6 @@ const mockClient: jest.Mocked<Pick<McpClient, "request">> = {
gh pr create \
--title "Fix #11847: Resolve Jest ESM configuration issues" \
--body "## 🎯 Task Completion Report
```

**Issue:** Closes #11847
**Priority:** 1 (BLOCKING)
Expand Down Expand Up @@ -261,16 +257,15 @@ const mockClient: jest.Mocked<Pick<McpClient, "request">> = {
\`\`\`bash
$ pnpm test
Test Suites: 510 passed, 510 total
Tests: 2,847 passed, 2,847 total
Snapshots: 0 total
Time: 47.123 s
Tests: 2,847 passed, 2,847 total
Snapshots: 0 total
Time: 47.123 s
\`\`\`

🤖 **This PR was generated by agentic automation**" \
--assignee @me \
--label "agentic-execution,ready-for-review,priority-1"

```
--assignee @me \
--label "agentic-execution,ready-for-review,priority-1"
```

6. **Monitor CI and merge when green**

Expand Down Expand Up @@ -300,4 +295,3 @@ Time: 47.123 s
---

**BEGIN IMPLEMENTATION NOW**
```
84 changes: 84 additions & 0 deletions .agentic-prompts/task-19016-frontier-closure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Task 19016 — Frontier Closure (Active PR Wave)

## Objective

Shrink the active PR frontier with minimal risk and maximum merge throughput by closing bounded PRs, resolving overlap, and converting umbrella work into narrowly scoped residuals.

## Scope

Primary PR wave:
- `#19016`–`#19029`

Fast-track candidates:
- `#19011`–`#19015` when independently mergeable

## Success Criteria

1. Frontier count materially reduced (merged or queued with auto-merge where appropriate).
2. `#19016` no longer acts as an uncontrolled umbrella; it is merged narrowly or explicitly converted into a human decision point.
3. Duplicate workflow/check/artifact ownership resolved across GA/CI/evidence PRs.
4. Remaining blockers are explicit, human-actionable, and minimal.
5. Approval churn minimized (metadata/doc-only fixes preferred when possible).

## Non-Negotiables

- Preserve approvals whenever possible.
- Smallest patch to unblock.
- Never claim green CI/checks if not verified.
- No unrelated refactors/style churn.
- Respect protected branch requirements and merge queue constraints.

## Execution Plan

### 1) Build frontier matrix
For each target PR, capture:
- title, scope size, mergeability, required checks, approvals, conflicts, overlap/deps, recommended action, confidence.

### 2) Sequence merges for throughput
Bias order:
1. independent small fixes,
2. docs/workflow-bounded GA PRs,
3. medium GA PRs with clear ownership,
4. umbrella residual,
5. agent/intel architecture stack.

### 3) Handle #19016 as umbrella
Decide one:
- merge as-is,
- minimal patch and queue,
- narrow/restack (default),
- explicit human gate.

### 4) Resolve GA overlap
Explicitly assign single owners for:
- required checks,
- evidence generation,
- provenance/SBOM/OpenLineage output names,
- workflow triggers/path filters,
- deterministic artifacts.

### 5) Fast-track bounded PRs
Prioritize:
- `#19017`, `#19022`, `#19023`, `#19024`, `#19020`

### 6) De-risk agent/intel cluster
Dependency stack hypothesis:
- `#19029` before `#19027`
- `#19028` before `#19026`
- `#19025` before `#19027` if graph reconciliation is prerequisite

### 7) Finalize handoff
Output sections:
1. Merged/queued/auto-merge enabled
2. Patched and awaiting checks
3. Ready for human approval
4. Needs restack/split/supersession
5. Blocked by policy/review/infra
6. Exact next human actions
7. Why this order minimizes risk

## Evidence Requirements

- Store matrix + sequencing decisions in `artifacts/frontier-closure-YYYY-MM-DD.md`.
- Include exact commands used and outcomes.
- If environment blocks live GitHub checks, label fields as `unverified` and escalate explicitly.
2 changes: 1 addition & 1 deletion .archive/v039/client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"module": "ES2022",
"outDir": "dist",
"moduleResolution": "Bundler",
"strict": true,
"strict": true, "types": ["node", "jest", "uuid"],
"esModuleInterop": true
},
"include": ["src"]
Expand Down
2 changes: 1 addition & 1 deletion .archive/v039/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "eslint ."
},
"dependencies": {
"@apollo/server": "^4.10.0",
"@apollo/server": "4.11.3",
"body-parser": "^1.20.2",
"cors": "^2.8.5",
"express": "^4.19.2",
Expand Down
2 changes: 1 addition & 1 deletion .archive/v039/server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"outDir": "dist",
"rootDir": "src",
"esModuleInterop": true,
"strict": true,
"strict": true, "types": ["node", "jest", "uuid"],
"skipLibCheck": true
},
"include": ["src"]
Expand Down
Loading
Loading