Skip to content

Student artifacts: populate the home_tar manifest; do not archive the primary user's tree twice - #110

Merged
mfthomps merged 1 commit into
mfthomps:masterfrom
spencer-dollahite:student-artifact-fixes
Sep 26, 2026
Merged

mfthomps merged 1 commit into
mfthomps:masterfrom
spencer-dollahite:student-artifact-fixes

Conversation

@spencer-dollahite

Copy link
Copy Markdown
Collaborator

Two small fixes in the student-artifact path (stoplab -> .lab archive), found while auditing what our students' archives contain.

  1. CheckTars.py: the per-image home_tar manifest (config/<image>-home_tar.list) is written from the stdout of tar czf ..., which prints nothing, so the manifest is always empty and Student.py never skips the home_tar seed files the lab designer guide ("Large or numerous files in the home directory") says are excluded. tar czvf produces the list. This matters whenever the image is built the same day the lab is started (designer/instructor test runs); for older images the modify-time rule already hides them.

  2. Student.py otherUsers(): it skips only the exact primary-user home directory and then os.walk descends into its subdirectories, so every file under the primary user's home is archived a second time under other_users/<primary user>/. Skip the whole subtree.

Both verified on Ubuntu 24.04 (noble) containers: the archive now holds the student's edited deliverables once, plus .local/result and bash histories, and no seed files.

🤖 Generated with Claude Code

https://claude.ai/code/session_01MQfHVX14NCvhJwMM4BqDpL

… primary user twice

- CheckTars.py wrote the per-image home_tar manifest from `tar czf` stdout, which is empty, so the
  manifest never listed anything and home_tar seed files (documents, bookmarks, notes) were collected
  into the student .lab archive whenever the image was built the same day the lab was started. `tar czvf`
  produces the list the designer guide describes.
- Student.py otherUsers() skipped only the primary user's top directory and then walked into its
  subdirectories, so every deliverable appeared a second time under other_users/<primary user>/.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQfHVX14NCvhJwMM4BqDpL
@mfthomps
mfthomps merged commit c257905 into mfthomps:master Sep 26, 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