Open
Description
Specification
Whilst considering vault schemas, it became apparent that it would be extremely beneficial to implement some kind of filesystem event-watching API integrated into the EFS, such that we can track changes before and after they're made directly to the files in the EFS. That is, before and after changes are made to files, we can generate an accumulating list of these changes. Then, we can provide hooks for these pre-edit and post-edit changes.
This would allow us to solve 3 problems in one:
- enforce the vault schema before a file change is made (i.e. pre-edit vs. having to do a post-edit check)
- easier automatic commit message generator
- accurate elimination of dirty commits
The latter 2 problems are currently being solved by a hacky, post-edit solution through recursive scans over the EFS (see the top-level comment from @scottmmorris here).
Additional context
- vault schemas epic Vault and File Schema - Ingress and Egress Schemas Polykey#222
Some further discussion of pre-edit and post-edit from the vaults refactoring MR:
- https://gitlab.com/MatrixAI/Engineering/Polykey/js-polykey/-/merge_requests/205#note_687323248
- https://gitlab.com/MatrixAI/Engineering/Polykey/js-polykey/-/merge_requests/205#note_687486709
Tasks
- ...
- ...
- ...