Layout#

Submissions#

Each homework gets its own directory. It is created by the install step and filled in by the fetcher:

system.json                 # system-wide configuration file
hw/<homework>/
├── fetcher_config.json     # what to fetch: org, token, paths, tests repo
├── grader_config.json      # how to grade: suites, categories, tests
├── tests/                  # shared test fixtures, synced from a tests repo
   ├── <fixture files>
   └── metadata.json       # last-pulled commit of the tests repo
└── repos/
    └── <homework>-<student>/
        ├── metadata.json   # sync state + lock target
        ├── repo/           # the student's submission (fetched files)
        └── logs/           # per-student run logs
            └── archive/    # gzipped old logs, pruned by age and size
  • Repos — every student repository for the homework is mirrored under hw/<homework>/repos/<homework>-<student>/, Only the paths listed in fetcher_config.json are copied into repo/.

  • Metadata — each repo and the tests directory carry a metadata.json recording the last fetched commit, the configured paths, the source repo and timestamps. It is what lets the fetcher do incremental diffs instead of re-downloading, and it doubles as the flock lock target: the fetcher holds an exclusive lock, the grader a shared one, so a repo is never fetched and graded at the same time.

  • Logs — per-repo logs live in logs/. On every run the previous session log is gzipped into logs/archive/, which is pruned by log_retention_hours and log_limit_mb from system.json.

Mirrors#

uoabot -s <student> --mirror creates a numbered copy in hw/<homework>/repos/<homework>-<student>-mirror1/, and flags is_mirror: true in its metadata. Mirrors are excluded from batch fetching and grading. --purge_mir deletes all mirrors of a repo.

Configuration files#

File

Location

Purpose

system.json

/opt/uoabot/system.json

Global settings: base_dir, makis_executable, logging, memory limits

fetcher_config.json

hw/<homework>/

Org, token, paths to copy, tests repo

grader_config.json

hw/<homework>/

Suites, categories and tests for the homework

Each layer is documented in docs/configs/ (system.md, fetcher.md, grader.md).