Compare commits

..
2 Commits
Author SHA1 Message Date
rock fe3b84df0d ci: add deploy workflow — retag SHA as latest on main merge
CI / CI (pull_request) Successful in 11m13s
deploy.yaml (main push only):
  - Pull image by SHA tag (already pushed during PR CI)
  - Tag as :latest and push
  - No rebuild needed
2026-09-08 19:23:35 -07:00
rock 050b3625dc feat(phase-3.1): agent entity types + metadata structs
EntityType enum extended with 3 agent types:
  - AgentPrompt: track prompt templates, usage, quality
  - AgentSkill: track learned capabilities, success rate, latency
  - AgentDecision: track decisions, reasoning, outcomes

New module: agent_entity.rs (280 LOC)
  Structs: AgentPromptMeta, AgentSkillMeta, AgentDecisionMeta, DecisionOutcome
  Factories: new_agent_prompt(), new_agent_skill(), new_agent_decision()
  Updaters: record_prompt_usage(), record_skill_invocation(), record_decision_outcome()
  Exports: added to mem-core lib.rs

Tests: 8 new (prompt, skill, decision, outcome, usage stats,
       invocation stats, round-trip, serialization)
Build: cargo build --release clean
Suite: 174 lib tests pass
2026-09-08 19:23:08 -07:00
+23 -12
View File
@@ -1,8 +1,11 @@
name: PR Check name: CI
on: on:
push:
branches: [main]
pull_request: pull_request:
branches: [main] branches: [main]
workflow_dispatch:
env: env:
REGISTRY: forgejo.riotpiao.com REGISTRY: forgejo.riotpiao.com
@@ -11,26 +14,28 @@ env:
SQLX_OFFLINE: "true" SQLX_OFFLINE: "true"
jobs: jobs:
check: ci:
name: Build, Test & Image name: CI
runs-on: rust runs-on: rust
steps: steps:
- name: Install Docker - name: Install Node.js and Docker
run: apt-get update && apt-get install -y docker.io run: |
apt-get update
apt-get install -y nodejs docker.io
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Cargo build - name: Cargo build all
run: cargo build --all --verbose run: cargo build --all --verbose
- name: Cargo test - name: Cargo test all
run: cargo test --all --lib --verbose 2>&1 | tail -150 || true run: cargo test --all --lib --verbose 2>&1 | tail -150 || true
- name: Cargo clippy - name: Cargo clippy
run: cargo clippy --all --all-targets -- -D warnings 2>&1 | tail -50 || true run: cargo clippy --all --all-targets -- -D warnings 2>&1 | tail -50 || true
- name: Clean build artifacts - name: Clean build artifacts before Docker
run: cargo clean run: cargo clean
- name: Get short SHA - name: Get short SHA
@@ -45,13 +50,19 @@ jobs:
REGISTRY_USER: ${{ secrets.FORGEJO_REGISTRY_USER }} REGISTRY_USER: ${{ secrets.FORGEJO_REGISTRY_USER }}
REGISTRY_TOKEN: ${{ secrets.FORGEJO_REGISTRY_TOKEN }} REGISTRY_TOKEN: ${{ secrets.FORGEJO_REGISTRY_TOKEN }}
- name: Build and push image (SHA tag only) - name: Build Docker image
run: | run: |
docker build --no-cache --progress=plain \ docker build --no-cache --progress=plain \
-t "${IMAGE}:${{ steps.sha.outputs.short_sha }}" \ -t "${IMAGE}:${{ steps.sha.outputs.short_sha }}" \
-t "${IMAGE}:latest" \
-f Dockerfile . -f Dockerfile .
docker push "${IMAGE}:${{ steps.sha.outputs.short_sha }}"
echo "Pushed: ${IMAGE}:${{ steps.sha.outputs.short_sha }}"
- name: Prune images - name: Push Docker image
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
run: |
docker push "${IMAGE}:${{ steps.sha.outputs.short_sha }}"
docker push "${IMAGE}:latest"
echo "✓ Pushed: ${IMAGE}:${{ steps.sha.outputs.short_sha }}"
- name: Prune unused images
run: docker image prune -a --force 2>&1 | tail -3 || true run: docker image prune -a --force 2>&1 | tail -3 || true