Skip to content

Dungeon#7035

Open
ramosian-glider wants to merge 6 commits intogoogle:masterfrom
ramosian-glider:syz-dungeon-land
Open

Dungeon#7035
ramosian-glider wants to merge 6 commits intogoogle:masterfrom
ramosian-glider:syz-dungeon-land

Conversation

@ramosian-glider
Copy link
Copy Markdown
Member


Before sending a pull request, please review Contribution Guidelines:
https://github.com/google/syzkaller/blob/master/docs/contributing.md


@ramosian-glider
Copy link
Copy Markdown
Member Author

@gemini-cli /review

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

🤖 Hi @ramosian-glider, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

🤖 I'm sorry @ramosian-glider, but I was unable to process your request. Please see the logs for more details.

@ramosian-glider
Copy link
Copy Markdown
Member Author

@gemini-cli /review

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

🤖 Hi @ramosian-glider, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

🤖 I'm sorry @ramosian-glider, but I was unable to process your request. Please see the logs for more details.

"google.golang.org/appengine/v2/memcache"
)

const upstreamNamespace = "upstream"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If we are to keep the code in the repo, we'd better move it to the global config. Add Dungeon bool to the namespace config or, if it'll ever be only one, maybe sth like DungeonNamespace string in the global config itself?

var tokenizerRegex = regexp.MustCompile(`[^a-zA-Z0-9\-_]+`)

// containsTokens is a helper that returns true if the input string contains any of the provided distinct tokens.
func containsTokens(s string, matchTokens ...string) bool {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: could be a bit more straightforward to construct a regexp out of those tokens with regexp.QuoteMeta and then call regexp.Match.

now := dungeonNow(ctx)
cutoff := now.UTC().AddDate(-1, 0, 0)

bugs, _, err := loadAllBugs(ctx, func(query *db.Query) *db.Query {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Would it work if you just queried Namespace=ns and Commit>""? Or we'd need another index?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, we will probably need another index.
Also does Commit>"" guarantee that a bug is fixed (i.e. doesn't have a different status)?
Is it possible for a fixed bug to not have a commit?

Add syz-dungeon.md to provide comprehensive documentation for the gamified
Syzkaller Dungeon leaderboard. The document covers character generation
rules, experience and leveling formulas, badge logic, corporate Kingdom
aggregations, and the provided JSON API schemas.
Introduce the Syzkaller Dungeon, a gamified leaderboard ranking kernel
contributors based on their bug-fixing activity.

The patch includes:
- Backend logic to fetch bug entities from Datastore, compute player
XP/levels via deterministic heuristics, map domain emails to corporate
Kingdoms, and assign RPG classes based on subsystem tags.
- Three new HTTP endpoints (/syz-dungeon, /syz-dungeon/hero, and
/syz-dungeon/kingdom) with programmatic JSON support.
- Fully interactive frontend HTML templates and styling emphasizing a
retro dark-mode aesthetic.
Introduce comprehensive unit tests for the Syzkaller Dungeon logic in
dungeon_test.go. The test suite covers:
- Core game mechanics including XP distributions, bonuses, and the
linear/legendary leveling formulas.
- Cosmetic badge evaluations triggered by vulnerability string matching and
milestone fix counts.
- Kingdom aggregation bounds, player identity resolution, name tie-breaking,
and fallback logic.
- Logarithmic scaling formulas computing the RPG profile stats.
Let's start with a tiny castle, we can decide on the UX later.
This change registers the new /cron/dungeon_preheat endpoint with
App Engine’s HTTP router and adds a corresponding hourly entry in
cron.yaml to execute it automatically.
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