Skip to content

Add FastAPI app, missing pipeline modules, and requirements#11

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/add-fastapi-app-structure
Draft

Add FastAPI app, missing pipeline modules, and requirements#11
Copilot wants to merge 2 commits into
mainfrom
copilot/add-fastapi-app-structure

Conversation

Copilot AI commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

The repo had no runnable entry point: no requirements.txt, no api/main.py, a Dockerfile pointing at a non-existent main:app, and unified_pipeline importing three modules (deconstructor, integrity_manager, kg_navigator) that didn't exist.

New modules

  • deconstructor.pydeconstruct() using spaCy (cached at module level) with a whitespace-tokenisation fallback
  • integrity_manager.pyverify_worm_integrity() + evaluate_source_quality() (clean re-impl; fixes [cite: N] syntax errors in the original reliability_score file)
  • kg_navigator.pyKnowledgeGraphNavigator wrapping Neo4j; degrades gracefully when Neo4j is unreachable
  • packs/secure-code.yaml — WORM constraints file (hard + soft rules)

API (api/main.py)

FastAPI app with three endpoints; KG navigator initialised once via lifespan context:

GET  /health              → {"status": "ok"}
POST /authority/verify    → delegates to AuthorityGate
POST /pipeline/execute    → deconstruct → KG → WORM → quality score → verified plan

Fixed files

  • unified_pipeline — imports now resolve; WORM_PATH updated to packs/secure-code.yaml; hardcoded bogus hash replaced with WORM_EXPECTED_HASH env-var (integrity check skipped when unset); SecurityError defined; module-level execution removed
  • docker_RootAi_fastAPICMD updated from main:appapi.main:app
  • requirements.txt — added: fastapi, uvicorn, pydantic, pyyaml, pytest, httpx, spacy, neo4j

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…_pipeline

Co-authored-by: tattoosonmyskin <155841536+tattoosonmyskin@users.noreply.github.com>
Copilot AI changed the title [WIP] Add FastAPI app structure with endpoint and Docker support Add FastAPI app, missing pipeline modules, and requirements Mar 3, 2026
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