Skip to content

bagit-python does not detect additional tag files in the bag base directory that are not listed in a tag manifest #212

Description

@kieranjol

We are investigating the use of tag files and folders outside of the data/payload directory. bagit-python does not check if any additional tag files NOT listed in a tag-manifest are present in the bag base directory with the other tag files (manifests, bag-info.txt etc). It would be useful if bagit-python gave a warning if additional files were present here.

I understand that current behaviour is consistent with the Bagit spec. Section 2.2.4 'Other Tag Files' is clear that an implementation MUST validate any tag listed in a manifest. And technically additional tag files NOT in a manifest would still pass as a complete and valid bag as per the spec.

However as the spec and python implementation allow for adding arbitrary tag files and folders to the base directory, and you see this implemented in various bagit profiles, it could be useful if some check and warning would be provided in cases where files are in the base directory in an unintended way.

Activity

  1. acdha commented on Nov 4, 2026

    @acdha
    Member

    That makes sense to have as something like a “strict” mode (perhaps we want a different name?) where we could alert to things which are technically compliant but likely to be confusing.

  2. added theissue type on Nov 4, 2026
  3. cmhosale commented on Nov 4, 2026

    @cmhosale

    Seconding Kieran - this is an issue I recently encountered in a few Archivematica bags (which appear to have been created by a bug, still investigating). Archivematica uses bagit-python and it would be nice to ask them to integrate a --strict logic check as part of bag validation. But I agree we could come up with a better term. --strict might not be self-explanatory, since "stowaways" (what MIT Libraries has taken to calling these additional files) are technically valid in spec.

    "--no-stowaways" probably isn't descriptive enough. How about "--strict-manifests"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions