Skip to content

Adopt hyalo project best practices (iter-23)#28

Merged
ractive merged 3 commits into
mainfrom
iter-23/hyalo-best-practices
May 9, 2026
Merged

Adopt hyalo project best practices (iter-23)#28
ractive merged 3 commits into
mainfrom
iter-23/hyalo-best-practices

Conversation

@ractive

@ractive ractive commented May 9, 2026

Copy link
Copy Markdown
Owner

Summary

Quality-and-consistency pass aligning hoppy with the sibling ../hyalo project's settled patterns. No new bunny.net API surface.

  • Hyalo schema — rich .hyalo.toml with type schemas (iteration, research, backlog, docs, decision) + 7 saved views.
  • Cargo workspace hygiene — hoist shared deps to [workspace.dependencies], add [workspace.package], resolver = "3", optimised [profile.release] (lto, codegen-units = 1, panic = "abort", strip), unsafe_code = "forbid" at the workspace level. Pedantic clippy deferred (separate flood-and-fix iteration).
  • Project hygiene docsAI_NOTICE, CHANGELOG.md Unreleased section, dogfooding playbook + cleanup-script skeleton (with hoppy-test- prefix convention), CLI command-tree audit, LLM-friendly help-text style guide, decision-log entries codifying verb conventions and naming rationale.
  • CLAUDE.md rewritten — Agents directive, expanded hyalo CLI usage, Dogfooding section, streaming/perf hint, cross-platform note, - [ ] Task checkbox spec.
  • Drive-by fixbunny-api-containers Protocol enum now accepts both PascalCase and lowercase (API is inconsistent on response casing); +5 unit tests.

Deferred to follow-ups (filed in hoppy-knowledgebase/backlog/ or noted in the iteration plan): rename pass with alias = "<old>", --dry-run audit across destructive commands, help-text template applied across the long tail, /review-rust all audit, crates/hoppy-cli/ move (iter-25 pre-req), live dogfooding session, drill-down hints (hyalo iter-107 pattern), lean README pass.

Test plan

  • cargo fmt
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace --quiet
  • hyalo lint hoppy-knowledgebase/iterations/iteration-23-hyalo-best-practices.md — clean
  • target/release/hoppy --help exercises all top-level commands (used to generate cli/command-tree.md)
  • Live dogfooding session against real bunny.net account — deferred per iteration plan

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Knowledgebase schema with typed documents, filename templates and several saved view presets.
    • Dogfooding playbook and a safe cleanup script for real-API testing.
  • Bug Fixes

    • Protocol parsing improved to accept multiple casing variants.
  • Documentation

    • CLI command reference, help-text style guide, changelog, decision log, and multiple iteration/backlog docs added.
  • Chores

    • Cargo/workspace metadata and dependency declarations centralized.

Quality-and-consistency pass aligning hoppy with the sibling ../hyalo
project's settled patterns. No new bunny.net API surface.

- Hyalo schema: rich .hyalo.toml with type schemas (iteration, research,
  backlog, docs, decision) + saved views (planned, stale-in-progress,
  completed-with-todos, missing-status, missing-type, open-tasks, orphans).
- Cargo workspace: hoist shared deps to [workspace.dependencies], add
  [workspace.package], switch to resolver = "3", add optimised
  [profile.release] (lto + codegen-units=1 + panic=abort + strip),
  forbid unsafe_code at the workspace level. Pedantic clippy deferred.
- AI_NOTICE at repo root + Unreleased section in CHANGELOG.
- Dogfooding playbook + cleanup-script skeleton (hoppy-test- prefix
  convention).
- CLI command-tree audit doc + LLM-friendly help-text style guide.
- decision-log entries: bunny-api-* naming rationale, verb conventions
  (create/add/update/delete/remove/list/get), workspace hygiene, and
  pedantic-deferred decision.
- CLAUDE.md: Agents directive, expanded hyalo CLI usage, Dogfooding
  section, streaming/perf hint, cross-platform note, fixed task-checkbox
  spec to "- [ ] Task".
- Backlog seeds: drill-down-hints (hyalo iter-107 pattern), lean README.
- Drive-by fix: bunny-api-containers Protocol enum accepts both
  PascalCase and lowercase (API is inconsistent on response casing).

Deferred to follow-ups: rename pass with aliases, --dry-run audit,
help-text template applied across the long tail, /review-rust audit,
crates/hoppy-cli move (iter-25 pre-req), live dogfooding session.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ractive
ractive requested a review from Copilot May 9, 2026 10:16
@coderabbitai

coderabbitai Bot commented May 9, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 7b5339ee-3b0d-4ab9-8a17-248e1fa7cb2e

📥 Commits

Reviewing files that changed from the base of the PR and between 851ae95 and efe7b2c.

📒 Files selected for processing (7)
  • CLAUDE.md
  • Cargo.toml
  • hoppy-knowledgebase/backlog/drill-down-hints.md
  • hoppy-knowledgebase/dogfooding/cleanup.sh
  • hoppy-knowledgebase/dogfooding/dogfooding-playbook.md
  • hoppy-knowledgebase/iterations/iteration-23-hyalo-best-practices.md
  • hoppy-knowledgebase/iterations/iteration-25-publish.md

📝 Walkthrough

Walkthrough

This PR centralizes Cargo workspace package/dependency configuration, converts crate manifests to workspace-managed references, adds a Hyalo-compatible knowledgebase schema and multiple CLI/documentation/dogfooding artifacts, and adjusts bunny-api-containers Protocol serde deserialization with a unit test.

Changes

Cargo workspace centralization and Rust enhancement

Layer / File(s) Summary
Workspace manifest foundation
Cargo.toml
Root Cargo.toml sets resolver = "3", adds [workspace.package], [workspace.dependencies], [workspace.lints.rust], and a [profile.release] with LTO/abort/strip settings.
Crate manifest updates
crates/bunny-api-*/Cargo.toml, xtask/Cargo.toml
Multiple crate manifests switch hardcoded package metadata and explicit dependency versions to workspace-managed references (*.workspace = true, workspace = true).
Protocol enum deserialization enhancement
crates/bunny-api-containers/src/types.rs
Protocol variants (Tcp, Udp, Sctp) gain serde aliases for lowercase/uppercase deserialization while serialization remains PascalCase; unit test added.

Knowledgebase schema and project governance

Layer / File(s) Summary
Knowledgebase schema and saved views
.hyalo.toml
Defines global required frontmatter (title, type), document type schemas (iteration, research, backlog, docs, decision) with per-type properties/defaults/validators and several saved view presets.
Project guidelines
CLAUDE.md
Standardizes Hyalo-based knowledgebase workflow, tightens iteration file rules, expands Rust contributor checks (cargo check, test/clippy steps), and adds dogfooding guidance.
CLI documentation standards
hoppy-knowledgebase/cli/command-tree.md, hoppy-knowledgebase/cli/help-text-style.md
command-tree.md enumerates CLI nouns/subcommands and verb conventions; help-text-style.md prescribes an LLM-friendly clap::Command template and validation checklist.
Decision log & iterations
hoppy-knowledgebase/decision-log.md, hoppy-knowledgebase/iterations/*
Records iter-23 decisions and adds iteration planning docs for hygiene (iter-23), container-logs/tunnel (iter-24), and publish (iter-25).
Dogfooding procedures
hoppy-knowledgebase/dogfooding/dogfooding-playbook.md, hoppy-knowledgebase/dogfooding/cleanup.sh
Playbook documents safe real-API testing with hoppy-test- prefix and dry-run-first; cleanup.sh is a scaffolded prefix-scoped script with per-surface stubs and guarded deletion behavior.
Backlog & notes
hoppy-knowledgebase/backlog/*, hoppy-knowledgebase/notes/*
Adds backlog items (drill-down-hints, lean-readme), command-tree/help-text docs, and a note recording ralph-loop false-failed exit behavior with hypotheses and a repro TODO.
Project metadata
AI_NOTICE, CHANGELOG.md
Adds AI disclosure AI_NOTICE and updates CHANGELOG.md Unreleased entry and compare link.

🎯 3 (Moderate) | ⏱️ ~20 minutes

🐰 A workspace unified at last, so tidy and grand!
Documentation flowing, each step now planned.
Safety loops spiraling, cleanup so spry—
From Hyalo's playbook, hoppy now hops high! 🚀


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns hoppy’s repository hygiene, workspace configuration, and knowledgebase conventions with the sibling hyalo project’s established patterns, while also addressing a real API inconsistency in bunny-api-containers enum casing.

Changes:

  • Adopt Cargo workspace “best practices”: [workspace.package], [workspace.dependencies], resolver = "3", workspace rust lints, and an optimized release profile.
  • Introduce a richer Hyalo knowledgebase schema (.hyalo.toml) plus substantial KB documentation (dogfooding playbook, CLI help-text style guide, command tree, iteration/backlog notes).
  • Make bunny-api-containers::Protocol deserialize both PascalCase and lowercase variants, with added unit tests.

Reviewed changes

Copilot reviewed 26 out of 26 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Cargo.toml Converts to workspace-oriented configuration (deps/package inheritance, resolver v3, lints, release profile).
CHANGELOG.md Expands Unreleased section and aligns with Keep-a-Changelog conventions/links.
AI_NOTICE Adds AI-generated code disclosure notice.
CLAUDE.md Updates contributor/agent workflow guidance and adds dogfooding + help-text guidance.
.hyalo.toml Adds Hyalo schemas (iteration/research/backlog/docs/decision) and saved views for KB hygiene.
xtask/Cargo.toml Switches to workspace-inherited package metadata and deps.
crates/bunny-api-core/Cargo.toml Inherits version/edition/license/repository and workspace deps.
crates/bunny-api-compute/Cargo.toml Inherits version/edition/license/repository and workspace deps.
crates/bunny-api-containers/Cargo.toml Inherits version/edition/license/repository and workspace deps.
crates/bunny-api-database/Cargo.toml Inherits version/edition/license/repository and workspace deps.
crates/bunny-api-recording/Cargo.toml Inherits version/edition/license/repository and workspace deps.
crates/bunny-api-shield/Cargo.toml Inherits version/edition/license/repository and workspace deps.
crates/bunny-api-storage/Cargo.toml Inherits version/edition/license/repository and workspace deps.
crates/bunny-api-stream/Cargo.toml Inherits version/edition/license/repository and workspace deps.
crates/bunny-api-containers/src/types.rs Adds serde aliases + tests so Protocol accepts inconsistent API response casing.
hoppy-knowledgebase/decision-log.md Records decisions about crate naming, CLI verbs, lint strategy, and workspace hoisting.
hoppy-knowledgebase/cli/help-text-style.md Adds an LLM-friendly help-text template/style guide.
hoppy-knowledgebase/cli/command-tree.md Adds a generated CLI command surface map for audits/prompts.
hoppy-knowledgebase/dogfooding/dogfooding-playbook.md Adds a safe real-API dogfooding loop and conventions.
hoppy-knowledgebase/dogfooding/cleanup.sh Adds a (currently placeholder) cleanup script scaffold for prefixed resources.
hoppy-knowledgebase/iterations/iteration-23-hyalo-best-practices.md Adds the iteration plan/write-up for this hygiene pass.
hoppy-knowledgebase/iterations/iteration-24-container-logs-tunnel.md Adds a planned iteration spec for container logs via syslog+tunnel.
hoppy-knowledgebase/iterations/iteration-25-publish.md Adds a planned iteration spec for publishing/release pipeline upgrades.
hoppy-knowledgebase/backlog/drill-down-hints.md Backlog item for “drill-down hints” output pattern.
hoppy-knowledgebase/backlog/lean-readme.md Backlog item for converting README into a lean landing page.
hoppy-knowledgebase/notes/ralph-loop-false-failed-exits.md Adds an investigation note about false failure signals in background iteration runs.

Comment on lines +63 to +69
`hoppy-knowledgebase/dogfooding/cleanup.sh` is the single tool that walks every API surface, lists resources matching `hoppy-test-`, and deletes them. It is **idempotent** — safe to run before AND after a session. It must:

- list-and-skip anything not matching the prefix (defence in depth — never delete an unprefixed resource even if requested)
- print what it is about to delete and require `--yes` to proceed (default is dry-run)
- exit non-zero if any deletion fails so CI can catch leaks

The script is intentionally a shell script (not Rust) so anyone can read and audit it. It's the only polyglot tool in the repo and lives only in the knowledgebase, not the build.
Comment on lines +11 to +18
DRY_RUN=1
for arg in "$@"; do
case "$arg" in
--yes|-y) DRY_RUN=0 ;;
--prefix=*) PREFIX="${arg#--prefix=}" ;;
*) echo "unknown arg: $arg" >&2; exit 2 ;;
esac
done
Comment thread CLAUDE.md Outdated
- No `.unwrap()` / `.expect()` outside of tests — use `anyhow::Context` with `?`
- No `clone()` unless the borrow checker demands it — try references first
- No unnecessary `pub` on struct fields
- All code stays in Rust — no polyglot tooling (no Bun, Node, Python scripts)
Comment thread Cargo.toml Outdated
Comment on lines +24 to +32
bunny-api-compute = { path = "crates/bunny-api-compute", version = "0.1.0" }
bunny-api-containers = { path = "crates/bunny-api-containers", version = "0.1.0" }
bunny-api-core = { path = "crates/bunny-api-core", version = "0.1.0" }
bunny-api-database = { path = "crates/bunny-api-database", version = "0.1.0" }
bunny-api-recording = { path = "crates/bunny-api-recording", version = "0.1.0" }
bunny-api-shield = { path = "crates/bunny-api-shield", version = "0.1.0" }
bunny-api-storage = { path = "crates/bunny-api-storage", version = "0.1.0" }
bunny-api-stream = { path = "crates/bunny-api-stream", version = "0.1.0" }
hoppy = { path = ".", version = "0.1.0" }
ractive and others added 2 commits May 9, 2026 12:25
Resolve Copilot and CodeRabbit findings on PR #28:
- cleanup.sh: refuse --yes since deletion is unimplemented; add DRY_RUN-respecting comment template
- dogfooding-playbook.md: relabel cleanup script as a skeleton with manual fallback steps; replace .invalid TLD example with a real example.com note
- CLAUDE.md: clarify Rust-only rule applies to build/runtime, not knowledgebase helper scripts
- Cargo.toml: drop redundant version field on internal workspace path deps so workspace.package version bumps stay single-edit
- backlog/drill-down-hints.md: switch wikilink to Obsidian-style absolute path
- iteration-25-publish.md: fix duplicated "0.1.0 vs 0.1.0" alternative to "0.1.0 vs 1.0.0"

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Status flipped to `completed`. The Notes section already enumerates what
landed vs. what was deferred to backlog/follow-up iterations; checkbox
state matches the merged diff so no per-item ticks were needed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ractive
ractive merged commit 390c2db into main May 9, 2026
5 of 7 checks passed
@ractive
ractive deleted the iter-23/hyalo-best-practices branch May 9, 2026 10:27
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