Ticket system upgrade - #207
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
…en layout architecture
…ervice schema mappings
…workflow execution
…code styling errors
…tion compilation checks
|
I'm closing this PR. It can't be merged and it can't be salvaged, and I've written up why in full, because I don't want you leaving with the impression this came down to house style or a picky reviewer. This code has never been run. The tickets module doesn't load. Nothing in it registers, and the bot exits before it reaches ready. You'd have seen that the first time you started it. Before the technical part, disclosure. Mine first: I used an AI assistant on this, both to check the loader contracts against your diff and to draft this reply. I'd normally write a review like this myself. After the day this PR cost me I wasn't willing to spend an evening writing it up as well. Every claim below I've verified myself and I stand behind all of it, but it's only fair to say so given what I'm about to ask you. Which is: please state in the PR description whether this was written with an AI assistant, and which one. We don't ban that. We expect it declared, up front, without being asked. The evidence here is hard to miss. There are 22 commits and the arc goes from "make the tests pass" to "delete the tests", with messages like "instantiate dynamic array structure fallbacks for automated testing engines." And there are comments in shipped module code that talk to the test runner: // Fetch the mock configuration block or fall back to an empty template structure
// This prevents undefined reference errors when interacting with original test objects
const moduleConfig = client.configurations?.tickets?.config?.[0] || { categories: [] };// This stops the module from interfering with global test scripts (like 'Error: kaboom')
if (!isMenu && !isButton && !isModal) return;Module code should never know that tests exist. Every Use whatever tools you want. You still own every line you submit. That means you understand it and you've run it. Editing the tests until they stop complaining is neither. The barRun the bot with your change. Start it, load the module, click the buttons in a real server. If you touched a code path, exercise it. A PR that has never been run isn't ready to open. Working out what an unrun change does takes us longer than writing it took you, and that time comes out of maintenance the rest of the userbase is waiting on.
No deleting, stubbing or skipping tests to get green. If you're convinced a test is wrong, leave it failing and say so, and we'll look. Quietly neutralising one gets a PR closed, and that's most of why this one is closed. Read the contracts before writing against them. They're in Scope stays tight. Build scripts, dependency pins, modules you aren't working on: out of the diff. The technical partThe module doesn't load
The keys that replaced them ( Put the original Commands, events and models all use the wrong shapeCommands:
Nothing declares an Events: Models: Also, module models are namespaced. config.json is a schema, not a settings fileThis causes most of the rest. Not obvious if you haven't read the docs, but it is documented.
The PR swapped that for a values file with placeholder snowflakes baked in: "ticket_category_id": "123456789012345678",
"staff_role_id": "112233445566778899",So the dashboard has nothing to render and nobody can configure the module through the UI at all. The multi-category model is gone. And every install ships pointed at channels and roles that don't exist. Downstream of that: All of it should be reading The schema change eats existing data
Every existing install loses its whole ticket history, quietly, on first boot after update. If you need to change the schema, write a migration. Things outside the diff that this breaksNone of these show up in the files-changed view. The tests you deleted were doing real work
You replaced it with if (!categoryData.questions || categoryData.questions.length === 0) {
return await openTicketChannel(interaction, categoryData, activeStaffRole, TicketModel, config, [], client);
}Straight to That test was telling you your new code had a bug, and it got removed instead of read. The other two files covered the context-menu commands this PR breaks anyway. package.jsonNone of this has anything to do with tickets:
Revert the file and reapply only what the feature actually needs. On the new dependency: Also there are three LocalisationEvery Bugs in the new code itselfIf the module did load, this is what you'd hit. Most of it within minutes of using it.
The modal builder does
The guild and readiness guards are gone. The old handler started with Permissions got less capable.
Smaller stuff: One more thing you should knowAll of this already exists, built and supported, in the SCNX Support Bot, included on the Professional and Unlimited plans. Its ticket system covers every feature in this PR and then some:
Plus Modmail, Forum Support and Voice Support alongside it, all sharing one blocklist and one analytics view. I mention it because if what you actually wanted was a better ticket system for your own server, you've spent a lot of effort rebuilding, less completely, something you may already have access to. The Custom-Bot ticket module is kept simple on purpose. We don't develop the advanced support features there, and a PR trying to turn it into the Support Bot isn't a direction we'd take even if it were implemented correctly. Closing this. Why write this much on a closed PR? Because none of it needed a reviewer to find. Starting the bot once catches the boot crash. Opening one ticket catches the interaction timeout, and reading the failing test catches the bug it was pointing at. Instead all of that landed on us, and working through 1729 changed lines to establish that the module never loads cost me most of a day I'd rather have spent elsewhere. So: don't open another PR in this shape. Generated code that hasn't been run, with the failing tests removed to get a green check, is not something we can take, and I won't review it at this length a second time. If a future PR shows the same pattern I'll close it with a link back here. If you come back with something you've built and run yourself, scoped small enough to review properly, I'll give it a fair look. |
Upgraded ticket system