AS a moderator, I want to be able to dynamically set the rules in an externally managed file #191

Open
opened 2022-09-17 11:43:16 +01:00 by Vylpes · 5 comments
Vylpes commented 2022-09-17 11:43:16 +01:00 (Migrated from github.com)

Story Points: 5


AS a moderator, I want to be able to dynamically set the rules in an externally managed file
SO THAT I can adjust the rules without requiring a git update

Acceptance Criteria

AS a moderator
GIVEN I want to update the rules for a server
WHEN I update a file in the appdata folder
THEN the rules will be carried over next time I generate the rules embeds

Subtasks

  • Create appdata configuration and folder
  • Add rules to the appdata
  • Update tests
  • Fix rules file not being found
  • If the rules file is invalid it should report back to the user
Story Points: 5 --- AS a moderator, I want to be able to dynamically set the rules in an externally managed file SO THAT I can adjust the rules without requiring a git update ## Acceptance Criteria AS a moderator GIVEN I want to update the rules for a server WHEN I update a file in the appdata folder THEN the rules will be carried over next time I generate the rules embeds ## Subtasks - [x] Create appdata configuration and folder - [x] Add rules to the appdata - [x] Update tests - [x] Fix rules file not being found - [x] If the rules file is invalid it should report back to the user
Vylpes added this to the 3.4.0 milestone 2023-06-04 14:26:55 +01:00
Vylpes changed title from Make the rules command dynamic to AS a moderator, I want to be able to dynamically set the rules in the database 2023-10-22 14:27:43 +01:00

How should we handle this? I think this needs thinking about

How should we handle this? I think this needs thinking about

How should we handle this? I think this needs thinking about

Do we maybe not put the rules in git and keep it externally managed? This way we can change the rules if we so need to more easily

> How should we handle this? I think this needs thinking about Do we maybe not put the rules in git and keep it externally managed? This way we can change the rules if we so need to more easily
Vylpes changed title from AS a moderator, I want to be able to dynamically set the rules in the database to AS a moderator, I want to be able to dynamically set the rules in an externally managed file 2024-03-10 15:08:26 +00:00
Vylpes self-assigned this 2025-11-07 17:53:34 +00:00
Vylpes stopped working 2025-11-07 18:36:13 +00:00
35 minutes 20 seconds
Vylpes added this to the 3.3 Sprint 9 project 2025-11-07 18:36:30 +00:00

This is failing - Rules file doesn't exist but it does

image

This is failing - `Rules file doesn't exist` but it does ![image](/attachments/d7bf3e36-a8fc-46b0-9a85-8f1077136303)
Vylpes stopped working 2025-12-08 21:40:49 +00:00
8 minutes 43 seconds
VylpesTester added spent time 2026-01-14 18:00:30 +00:00
5 minutes

It should fail gracefully and report JSON errors back to the user if the JSON is invalid

It should fail gracefully and report JSON errors back to the user if the JSON is invalid
Vylpes removed their assignment 2026-09-25 12:36:29 +01:00
Smithy-bot removed their assignment 2026-09-26 18:39:16 +01:00
Member

QA results (step/testing → step/uat)

Tested on release/3.4.0 @ 45fab10 (includes merged PRs #524, #538, #586).

Acceptance criteria

  • Rules loaded from $DATA_DIR/rules/<guildId>.json via path.join (absolute DATA_DIR works) — PASS
  • Updating that file is picked up on next /rules embeds (no git change required) — PASS (file read on each invoke)
  • Missing file reports Rules file doesn't exist. — PASS (covered by suite)
  • Invalid JSON fails gracefully with Rules file contains invalid JSON: … (ephemeral) — PASS (covered by suite; PR #586)
  • Rules registered in registry.ts — PASS

Automated checks

  • yarn install --frozen-lockfile — PASS
  • yarn build (tsc) — PASS
  • yarn test — PASS (4 suites / 52 tests / 2 snapshots)
  • tests/commands/rules.test.ts alone — 32/32 PASS
  • yarn lint — N/A on this branch (no lint script)

Discord /rules embeds smoke against a real appdata file left for human UAT.

Assigned to @Vylpes for UAT.

## QA results (`step/testing` → `step/uat`) Tested on `release/3.4.0` @ `45fab10` (includes merged PRs #524, #538, #586). ### Acceptance criteria - Rules loaded from `$DATA_DIR/rules/<guildId>.json` via `path.join` (absolute `DATA_DIR` works) — **PASS** - Updating that file is picked up on next `/rules embeds` (no git change required) — **PASS** (file read on each invoke) - Missing file reports `Rules file doesn't exist.` — **PASS** (covered by suite) - Invalid JSON fails gracefully with `Rules file contains invalid JSON: …` (ephemeral) — **PASS** (covered by suite; PR #586) - `Rules` registered in `registry.ts` — **PASS** ### Automated checks - `yarn install --frozen-lockfile` — PASS - `yarn build` (`tsc`) — PASS - `yarn test` — PASS (**4** suites / **52** tests / **2** snapshots) - `tests/commands/rules.test.ts` alone — **32/32** PASS - `yarn lint` — N/A on this branch (no lint script) Discord `/rules embeds` smoke against a real appdata file left for human UAT. Assigned to @Vylpes for UAT.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Total time spent: 49 minutes 3 seconds
Vylpes
44 minutes 3 seconds
VylpesTester
5 minutes
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
RabbitLabs/vylbot-app#191
No description provided.