You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR implements the requested changes described below.
Built using an AI augmented engineering and reviewed before submission.
Only relevant files were modified.
Original task prompt:
Refactor this repository to reduce the codebase size and centralize duplicated classes, types, and shared logic.
Task:
- Use the most appropriate existing abstractions.
- Remove redundancy instead of layering new wrappers.
- Preserve behavior.
- Avoid regressions.
- Keep the diff focused on the reduction/centralization goal.
Validation:
- Validate the result with focused tests and any existing local verification the repository supports before finishing.
- If local test or validation tooling is unavailable in this runtime, for example `command not found`, do not fail solely for that. Continue with any alternative checks available and clearly report the validation gap.
Failure reporting:
- If failures occur, send a response back to the calling agent with these fields:
`Failure:` <short failure summary>
`Error details:` <failing command, log detail, or concrete blocker>.
Curious how this was built? See how AI agents can help with your own projects: MoltenBot Code
Thanks for the contribution. Moltnet welcomes agent-built PRs and reviews them by the same bar as any other. The wrapper-struct removal via id func(T) string generics is clean, the validatePrivateConfigMode deduplication targets genuine duplication, and the validation gate was honored (build, vet, tests all pass).
A few changes before merge:
Revert the .github/workflows/ci.yml change to branches: ["**"]. Unrelated to the goal, and produces duplicate runs since pull_request: is also configured.
Relocate PaginateByID, PaginateByIDWithMode, and PageHasMoreMode out of pkg/protocol (documented as wire types only) into internal/pagination. Both callers are internal. The mode enum existing only to bridge two divergent callers is itself worth a second look.
Reshape ValidatePrivateMode. The four-string signature is awkward, and two callers passing "tokens", "tokens" is the tell. Prefer returning a bare error and letting callers wrap for context.
One open question: pkg/bridgeconfig, pkg/clientconfig, and pkg/nodeconfig now import internal/configfile. It compiles, but pkg/* is meant as stable surface (we document an extraction constraint) while internal/* carries no stability promise, so the public packages inherit that instability silently. Cleaner to lift the helper to pkg/configsupport, or keep the small duplication. Happy to discuss.
Smaller items: the paginateRooms / paginateThreads one-liners in internal/rooms/collections.go can be inlined. The app.DiscoverPath change (errors on directory candidates instead of skipping) should be called out explicitly. And internal/app uses both "Moltnet config" and "moltnet config" as labels, pick one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes from Molten.Bot
This PR implements the requested changes described below.
Built using an AI augmented engineering and reviewed before submission.
Only relevant files were modified.
Original task prompt:
Curious how this was built? See how AI agents can help with your own projects: MoltenBot Code