Skip to content

Docs: read a newly loaded project's own file once it is the project in use - #2080

Merged
repeat98 merged 2 commits into
repeat98:mainfrom
Andrey-Sidorkin:docs/banks-loaded-directory
Nov 24, 2026
Merged

repeat98 merged 2 commits into
repeat98:mainfrom
Andrey-Sidorkin:docs/banks-loaded-directory

Conversation

@Andrey-Sidorkin

Copy link
Copy Markdown
Contributor

What works: the module guide now says when a module can read a newly loaded project's own file. Loading another project (PROJECT > CHANGE), stock's project directory still names the last project at ev_banks_load and at ev_banks_loaded, so a module that reads there gets the previous project's file. Documentation only: nothing changes on a unit, and no module or base is touched.

Musically: none directly. It saves the next module author from a bug where a project loaded after another came up with the other project's settings (Songbook, #1737: book, arrangement and setlists).

Who must act: a maintainer's review. @repeat98, the hook contracts in events.json (and so HOOKS.md) still say to read at ev_banks_loaded. Changing them regenerates modwerk_events.h, a reviewed base input whose hash the USB AUDIO recipes pin, so I left that for the cumulative base draft rather than this PR. The proposed wording is below.

Tested on a unit: the finding was seen on my MKI (OS 1.40C, base 0.7.13) with Songbook builds before a6fd6a1eb, and its fix confirmed on build 85d544a68 (package 81eb7172), in #1737.

Next: review and merge.

Details
  • docs/module-guides/README.md: one bullet under Integrate with what exists, after Survive saved work.
  • changelog/2026-11-24-banks-loaded-directory.md.
  • What the unit showed: at both hooks, stock's project name (0x100f8378), which the project directory is built from, still names the last project; the LOAD request (0x40023b68) puts the new name into its job's record (0x460bdec1). Songbook now compares the two and reads in a card job of its own after the load (Songbook 0.1.0-experimental (draft): 128 arrangements as 16 books of 8 (Octatrack) #1737, RESEARCH.md).
  • Proposed contract wording for the base draft:
    • ev_banks_load: "…so it marks its own copy stale here. Loading another project (PROJECT > CHANGE), stock's project directory still names the last project here and at ev_banks_loaded; the new name is only in the load job's record (0x460bdec1) until the load is over. A module reads its file once the name in use (0x100f8378) is the new one, or in a card job of its own after the load."
    • ev_banks_loaded: "…a module reads its own file from the project directory now, except when another project is being loaded: see ev_banks_load."
  • Checks: npm run pr:ready passed on this commit.

What the guides lacked or got wrong: HOOKS.md (from events.json) says to read a per-project file at ev_banks_loaded; for a LOAD of another project that reads the last project's file. Fixed in the module guide here; the contract itself is proposed above for the base draft.

🤖 Generated with Claude Code

…n use

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 23, 2026
@repeat98
repeat98 enabled auto-merge (squash) November 24, 2026 07:59
@repeat98
repeat98 merged commit 5120de2 into repeat98:main Nov 24, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants