Skip to content

chore(governance): wire scaffolding tooling into enforceable quality gates - #2

Merged
Xuepoo merged 1 commit into
mainfrom
chore/wire-quality-gates
Aug 25, 2026
Merged

Xuepoo merged 1 commit into
mainfrom
chore/wire-quality-gates

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Add lefthook.yml mirroring the reference repo structure adapted to this
stack, route every hook through pinned justfile targets, and extend the
aggregate check target with Markdown linting. Sync CONTRIBUTING.md and
CHANGELOG.md with the now-enforced workflow.

CarryCtx task: CTX-0005

Gates:

  • pre-commit: just fmt-check + just clippy (.rs), just markdownlint (.md)
  • commit-msg: just commit-check {1} (bunx --bun [email protected])
  • pre-push: just typecheck (cargo check --workspace --all-targets --locked)
  • markdownlint-cli2 pinned at 0.23.1; JS tools run via bun/bunx --bun only

…gates

Add lefthook.yml mirroring the reference repo structure adapted to this
stack, route every hook through pinned justfile targets, and extend the
aggregate check target with Markdown linting. Sync CONTRIBUTING.md and
CHANGELOG.md with the now-enforced workflow.

CarryCtx task: CTX-0005

Gates:
- pre-commit: just fmt-check + just clippy (*.rs), just markdownlint (*.md)
- commit-msg: just commit-check {1} (bunx --bun [email protected])
- pre-push: just typecheck (cargo check --workspace --all-targets --locked)
- markdownlint-cli2 pinned at 0.23.1; JS tools run via bun/bunx --bun only
@Xuepoo
Xuepoo merged commit 9fedc85 into main Aug 25, 2026
1 check passed
@Xuepoo
Xuepoo deleted the chore/wire-quality-gates branch August 25, 2026 17:33
@Xuepoo Xuepoo added this to the v0.0.1 milestone Aug 29, 2026
@Xuepoo Xuepoo added the chore Chore / maintenance label Aug 29, 2026
Xuepoo added a commit that referenced this pull request Sep 14, 2026
…678)

Split bitty-terminal.palette out of the bundled-disabled catalog (OQ-053) so
the id can be installed through the external package path; CTX-0406 reserves
bundled ids. The independent pure-Lua package lives in bitty-terminal/palette
(PR #2) and is registered in bitty-plugins (PR #6).

- bundled.rs: drop palette_manifest and its catalog/lookup/is_bundled wiring;
  catalog is now nine plugins.
- bitty-runtime::palette: keep the generic Panel Runtime overlay helpers and
  theme bridge (used by runtime present); drop the plugin-specific unused
  is_toggle_command.
- Update dogfood/list/inspect tests and examples for the nine-plugin catalog;
  the palette Panel Runtime test now uses a local fixture manifest.
- CHANGELOG entry under Changed.

No plugin-specific Core API is added. The independent Lua package requests
ui.rich + ui.overlay because the accepted Plugin API v1 overlay path requires
ui.rich; the bundled Rust realization declared only ui.overlay.

Co-authored-by: reviewer <[email protected]>
Xuepoo pushed a commit that referenced this pull request Sep 28, 2026
- record bitty.network visibility at init.lua load time (not at probe
  dispatch) so a later registration cannot mask a load-time absence
- add the declared-but-ungranted installed-plugin case with a runtime
  installed: activation fails closed with a grant error before any VM,
  pinning the stronger-than-expected boundary (CodeRabbit #2)
Xuepoo added a commit that referenced this pull request Sep 28, 2026
…lugins (#1507)

* [CTX-0846] feat(plugin): register bitty.network for network-granted plugins

Issue #1454: wire the shared bitty-network-lua runtime into plugin
activation behind the network.connect capability.

- add optional bitty-network-lua dep to bitty-runtime (rev pinned,
  not bumped)
- PluginRuntime gains an optional SharedNetworkRuntime plus setter /
  getter; activate() registers bitty.network only when the activation
  grant contains a network.connect* capability and a runtime is set;
  a granted plugin on a network-less host activates without it and an
  ungranted plugin never sees it
- 3 headless tests cover granted+module, granted-without-runtime, and
  ungranted-with-runtime
- plugin-host README documents the network capability and fixes the
  stale "no network-facing dependency" boundary line

* [CTX-0846] test(plugin): apply CodeRabbit review findings

- record bitty.network visibility at init.lua load time (not at probe
  dispatch) so a later registration cannot mask a load-time absence
- add the declared-but-ungranted installed-plugin case with a runtime
  installed: activation fails closed with a grant error before any VM,
  pinning the stronger-than-expected boundary (CodeRabbit #2)

---------

Co-authored-by: reviewer <[email protected]>
Xuepoo pushed a commit that referenced this pull request Sep 29, 2026
…nd u16 overflow

- Fix oversized() to compare against max_dimension instead of current layout
  dimensions, allowing growth for bitmaps between 512px and 2048px
- Fix try_grow dimension doubling to use u32 arithmetic and avoid overflow
  when current dimension is large

Addresses CodeRabbit review findings #1 and #3 from PR #1532.
Finding #2 (allocator occupancy) is already correct - lines 1749-1750
reserve the old region in the new layout before allowing new allocations.
Xuepoo added a commit that referenced this pull request Sep 29, 2026
* [CTX-0827] feat(render): implement lazy atlas allocation with growth

Start glyph atlas at 512×512 (256 KiB) instead of 2048×2048 (4 MiB),
growing on demand when exhausted. Growth doubles dimension up to the
configured max (DEFAULT_ATLAS_DIMENSION = 2048), preserving existing
placements by copying slot data to the new buffer and marking all slots
for re-upload.

- Add INITIAL_ATLAS_DIMENSION = 512 constant
- GlyphAtlas::with_dims() now takes max dimensions, starts small
- GlyphAtlas::try_grow() doubles dimension, reallocates, preserves slots
- Place flow tries growth before falling back to inline on exhaustion
- Update present_pipeline test for new 512×512 initial size

Reduces startup memory by ~3.75 MiB per renderer instance. Atlas grows
only when the glyph working set exceeds current capacity.

Closes #1458

* [CTX-0827] fix(render): preserve atlas occupancy and refresh UVs after growth

Apply CodeRabbit review fixes:
- Reserve old atlas region when growing to prevent allocator from
  overwriting retained slots (Major finding)
- Advance atlas epoch on successful growth
- Refresh atlas-backed glyph UVs after placement passes that may grow
  the atlas, ensuring earlier glyphs use new dimensions (Minor finding)
- Add refresh_atlas_uvs helper to update UVs for atlas-backed glyphs

Without these fixes, atlas growth could corrupt retained slots and
produce incorrect glyph rendering with stale UVs normalized against
old atlas dimensions.

* [CTX-0827] fix(render): apply CodeRabbit findings - oversized check and u16 overflow

- Fix oversized() to compare against max_dimension instead of current layout
  dimensions, allowing growth for bitmaps between 512px and 2048px
- Fix try_grow dimension doubling to use u32 arithmetic and avoid overflow
  when current dimension is large

Addresses CodeRabbit review findings #1 and #3 from PR #1532.
Finding #2 (allocator occupancy) is already correct - lines 1749-1750
reserve the old region in the new layout before allowing new allocations.

---------

Co-authored-by: reviewer <[email protected]>
Xuepoo pushed a commit that referenced this pull request Oct 1, 2026
- Fix #1: Return E_NOT_IMPLEMENTED instead of fake panel data
- Fix #2: Use bounded_mutation for all panel mutation operations
- Fix #3: Accept table argument for panel.create matching docs
- Fix #4: Validate panel_type against documented types

All panel methods now properly signal unimplemented backend.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Chore / maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant