ArchSeal is a GenLayer dApp that turns a public GitHub pull request into an auditable, on-chain architecture-compliance seal.
It pins the pull request's exact base and head commits, reads repository-approved governance from the pinned base commit, gathers the declared Architectural Decision Records (ADRs) and changed code, and lets independent GenLayer AI validators decide whether the change is COMPLIANT, VIOLATES_ADR, or INCONCLUSIVE.
- Live app: archseal.xyz
- V2 contract:
0x8c78889F854327F6bFfa9eC4e4Db6fa4DB6F9F6d - Accepted V1 contract:
0x45f2E002B0980ADD2D82E7146F72cC17CFCc2C2b - Network: GenLayer Bradbury Testnet, chain
4221(0x107D)
Architecture rules are usually checked manually. A pull request can change after a review, contributors can point a checker at a convenient subset of ADRs, and a green result can hide missing or truncated evidence.
ArchSeal makes the evidence and decision reproducible:
- the reviewed base and head commits are immutable;
- ADR scope comes from maintainer-approved repository policy, never form input;
- incomplete evidence can never produce a compliance seal;
- the review identity is derived from the GenLayer transaction context rather than a predicted shared counter;
- the final seal binds the review ID, policy, commits, and consensus verdict;
- contract state is the only source of truth—there is no backend, database, browser LLM, or mocked verdict.
V2 directly addresses the review feedback received after the original project was accepted.
Every protected repository commits .archseal/policy.json on its base branch:
{
"schema": "archseal-policy-v1",
"policy_version": "1.0.0",
"repository": "zakazaka95/ArchSeal",
"adr_path": "docs/adr",
"maintainers": ["zakazaka95"],
"require_complete_evidence": true
}The contract reads this policy from the pull request's pinned base commit. A pull request cannot change its own review scope, weaken completeness requirements, or select a different ADR directory through the UI.
The contract records exact incompleteness reasons and deterministically returns INCONCLUSIVE before invoking the LLM when:
- the ADR directory is missing, empty, or exceeds its cap;
- an ADR document is unavailable or truncated;
- the changed-file list is missing or exceeds its cap;
- a changed file has no reviewable patch;
- an individual patch or the total diff exceeds the declared limits.
The result exposes evidence_complete and incomplete_reasons on-chain.
GenVM does not expose an outer transaction hash to contract code. V2 therefore derives a 64-character SHA-256 review ID from the available transaction context (chain, contract, origin, sender, deterministic transaction timestamp) plus the repository, PR, commits, and policy hash. total_reviews remains a statistic only and is never used to predict or allocate an ID.
open_review(repo_owner, repo_name, pull_request, contributor_wallet)- fetches the public GitHub PR;
- pins base/head commit hashes;
- reads and validates
.archseal/policy.jsonfrom the base commit; - stores an
OPENreview under its transaction-derived string ID.
evaluate_review(review_id)- reloads the pinned policy and evidence;
- forces
INCONCLUSIVEif any required evidence is incomplete; - otherwise asks independent validators to evaluate the change;
- stores the verdict and final
seal_hash.
refund_review(review_id)refunds an eligible inconclusive reward.
Read methods:
get_review(review_id: string)
get_latest_review(sponsor: address)
get_recent_reviews(limit: u256)
get_stats()
The V2 source is contracts/ArchSealV2.py. The accepted V1 deployment remains linked above as public on-chain evidence.
.archseal/policy.json Repository-owned ArchSeal policy
contracts/ArchSealV2.py GenLayer Intelligent Contract
docs/adr/ Architectural Decision Records
docs/STUDIO_TEST_V2.md Studio deployment and verification script
src/ React frontend
tests/test_archseal_v2.py Deterministic contract tests
pnpm install
pnpm devThe frontend is configured for the deployed V2 instance and reads its public proof directly from accepted contract state.
python -m unittest discover -s tests -p "test_*.py"
pnpm buildThe tests cover policy-controlled scope, transaction-context IDs, complete-evidence consensus, and deterministic inconclusive results for truncated evidence.
MIT