Skip to content

Conversation

deboer-tim
Copy link
Member

Adds an optional simplified judgement type id to judgement types. These would be specified in cases where (e.g.) a team should not see the specific judgement that another team received.

The length of the property is unfortunate, but follows the naming pattern elsewhere.

** This is the first half of this change - judgements may need to be modified as well. We will not release a new version of the spec until we complete the second change or back this one out.

Adds an optional simplified judgement type id to judgement types. These would be
specified in cases where (e.g.) a team should not see the specific judgement that
another team received.

The length of the property is unfortunate, but follows the naming pattern elsewhere.

** This is the first half of this change - judgements may need to be modified as
well. We will not release a new version of the spec until we complete the second
change or back this one out.
deboer-tim and others added 2 commits September 13, 2025 11:40
Co-authored-by: Nicky Gerritsen <[email protected]>
Co-authored-by: Nicky Gerritsen <[email protected]>
@johnbrvc
Copy link
Collaborator

An example would be nice in the Examples section that includes a judgement-type with a simplified judgement-type, and, the simplified judgement-type record.

@deboer-tim
Copy link
Member Author

An example would be nice in the Examples section that includes a judgement-type with a simplified judgement-type, and, the simplified judgement-type record.

Added an example of TLE -> RE.

Also reformulate the conditions on the simplified judgements.
Now `simplified_judgement_type_id` must have a value iff
`simplified_only` is false.

That the simplification cannot chain or loop is captured by
the requirement that a judgement type that is both original
and simplified must be its own simplification.
nickygerritsen
nickygerritsen previously approved these changes Sep 15, 2025
@deboer-tim
Copy link
Member Author

I haven't understood the requirement why we need to know which judgements can be applied directly vs simplified ones, and why it wouldn't be simpler to use a different judgement type if that's required - i.e. having simplified_only seems like an unnecessary complexity to me. If others +1 I am fine with this though.

@niemela
Copy link
Member

niemela commented Oct 13, 2025

We discussed this. @nickygerritsen will write an update. If we get 2 approve (and no change requests) on it I will merge.

@nickygerritsen nickygerritsen added this to the 2025-09 milestone Oct 13, 2025
@nickygerritsen
Copy link
Collaborator

We discussed this. @nickygerritsen will write an update. If we get 2 approve (and no change requests) on it I will merge.

Seems I can't push to @deboer-tim s branch. I asked him to enable the option so I can since I have a change ready.

@deboer-tim
Copy link
Member Author

That option was already on. I tried to figure out why you can't use it, and I'm guessing it's because you're listed as an outside collaborator and not a maintainer. According to google: "To promote an Outside Collaborator to a Maintainer on GitHub, you must first convert them to a member of the organization and then assign them a maintainer role"

Sure enough, you aren't even in the ICPC org - and I don't have authority to add you. @niemela ?

@niemela
Copy link
Member

niemela commented Oct 15, 2025

Sure enough, you aren't even in the ICPC org - and I don't have authority to add you. @niemela ?

I have invited @nickygerritsen to the org (and also @eldering for good measure). Is there someone else that is missing?

@nickygerritsen
Copy link
Collaborator

nickygerritsen commented Oct 15, 2025

I think that didn't work like we wanted. I'm still getting this message:

You're not authorized to push to this branch. Visit https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches for more information.

I think I need to become maintainer on this repo as well.

@niemela
Copy link
Member

niemela commented Oct 15, 2025

I think I need to become maintainer on this repo as well.

Now you are.

@nickygerritsen
Copy link
Collaborator

I think I need to become maintainer on this repo as well.

Now you are.

Thanks, the message went away. Pushing still fails...:

Pushing to github.com:deboer-tim/ccs-specs.git
error: Authentication error: Authentication required: You must have push access to verify locks
error: failed to push some refs to 'github.com:deboer-tim/ccs-specs.git'

I have no clue anymore, so here is my diff:

diff --git a/Contest_API.md b/Contest_API.md
index 7398e03..44be44c 100644
--- a/Contest_API.md
+++ b/Contest_API.md
@@ -913,7 +913,6 @@ Properties of judgement type objects:
 | penalty                         | boolean   | Whether this judgement causes penalty time. Required iff contest:penalty\_time is present.
 | solved                          | boolean   | Whether this judgement is considered correct.
 | simplified\_judgement\_type\_id | ID?       | Identifier of this type's simplified judgement type. When using simplified judgements, this is required iff simplified\_only is false.
-| simplified\_only                | boolean   | Whether this judgement is only used as simplified judgement type, never as normal judgement. Defaults to false.
 
 #### Known judgement types
 
@@ -972,17 +971,21 @@ For instance, in a contest where teams cannot see the specific reason another te
 might see their own judgement types, but judgements from other teams would return the corresponding simplified judgement
 type instead.
 
-If not using simplified judgements, the properties `simplified\_judgement\_type\_id` and `simplified\_only` must not be set.
+If not using simplified judgements, the property `simplified\_judgement\_type\_id` must not be set.
 
 A judgement type may be used both as original and simplified judgement type, but must then simplify to itself and have
 `simplified\_judgement\_type\_id` equal to `id`.
 For example, `AC` (aka correct) would typically map to `AC` also as simplified judgement type.
 
-The property `simplified\_only` must be set to `true` if a judgement type is only used as simplified judgement type.
-In that case `simplified\_judgement\_type\_id` must not be set. A typical example would be `RE` aka rejected.
-If `simplified\_only` is (per default) `false` then `simplified\_judgement\_type\_id` must have a value,
-that is, all original judgement types must simplify to something (which may be itself).
-Furthermore, the simplified judgement type must have the same `penalty` and `solved` values as the original jugdement type.
+If a system is interested in finding the set of judgement types that are only original judgement types, only simplified
+judgement types or both, one can use this logic:
+
+- The set of original judgement types are the ones that have `simplified\_judgement\_type\_id` set.
+- The set of simplified judgement types are the ones that appear in `simplified\_judgement\_type\_id`.
+- The set judgement types that are both is the intersection of these two sets.
+
+This assumes the system is using simplified judgement types. If it is not (i.e. if `simplified\_judgement\_type\_id` is not set
+for any judgement type), all judgement types are original only.
 
 #### Examples
 
@@ -997,8 +1000,7 @@ Returned data:
    "id": "RE",
    "name": "Rejected",
    "penalty": true,
-   "solved": false,
-   "simplified_only": true
+   "solved": false
 }, {
    "id": "TLE",
    "name": "Time Limit Exceeded",
@@ -1023,5 +1025,4 @@ Returned data:
    "penalty": false,
    "solved": true,
    "simplified_judgement_type_id": "AC"
-   "simplified_only": false
 }]

@johnbrvc
Copy link
Collaborator

I think I need to become maintainer on this repo as well.

Now you are.

Thanks, the message went away. Pushing still fails...:

Pushing to github.com:deboer-tim/ccs-specs.git
error: Authentication error: Authentication required: You must have push access to verify locks
error: failed to push some refs to 'github.com:deboer-tim/ccs-specs.git'

I think this is saying you need access to @deboer-tim 's REPO, not icpc. So, Tim has to grant you push access to HIS repo so you can update his fork that will get merged into the icpc ccs-specs.

@nickygerritsen
Copy link
Collaborator

I think I need to become maintainer on this repo as well.

Now you are.

Thanks, the message went away. Pushing still fails...:

Pushing to github.com:deboer-tim/ccs-specs.git
error: Authentication error: Authentication required: You must have push access to verify locks
error: failed to push some refs to 'github.com:deboer-tim/ccs-specs.git'

I think this is saying you need access to @deboer-tim 's REPO, not icpc. So, Tim has to grant you push access to HIS repo so you can update his fork that will get merged into the icpc ccs-specs.

But it does tell me this:
image

and normally in the DOMjudge repo at least I can push to other peoples repos.

@deboer-tim
Copy link
Member Author

I sent an invite to the repo, just to see if that changes anything. 🤷🏼‍♂️

@nickygerritsen
Copy link
Collaborator

That DID work, I have pushed my change.

@johnbrvc
Copy link
Collaborator

johnbrvc commented Oct 15, 2025

That DID work, I have pushed my change.

By default, it seems logical. If "someone" forks a repo, what gives (even the maintainers) the right to push to that "someone's" fork? The "someone" has to grant that permission explicitly. Your DJ team must have granted each other permission to push to each other's forks.

@nickygerritsen
Copy link
Collaborator

That DID work, I have pushed my change.

By default, it seems logical. If "someone" forks a repo, what gives (even the maintainers) the right to push to that "someone's" fork? The "someone" has to grant that permission explicitly. Your DJ team must have granted each other permission to push to each other's forks.

Normally github has an option when you create a PR:
image

This option allows maintainers to push to your fork but only for the branch for that PR. It works like a charm normally, but apparently not in this repo.

@deboer-tim
Copy link
Member Author

I like the changes 👍🏼, but simplified_only is still in the description at the top and example at the bottom. Want me to fix that, or do another commit?

In two places it says "If not using simplified judgements, the property simplified\_judgement\_type\_id must not be set." I'm tempted to say we should go stronger and say the property should be unused or even not exist in /access ... but I guess that's harder to implement and we don't do it elsewhere.

@nickygerritsen
Copy link
Collaborator

I like the changes 👍🏼, but simplified_only is still in the description at the top and example at the bottom. Want me to fix that, or do another commit?

Feel free to fix it.

In two places it says "If not using simplified judgements, the property simplified\_judgement\_type\_id must not be set." I'm tempted to say we should go stronger and say the property should be unused or even not exist in /access ... but I guess that's harder to implement and we don't do it elsewhere.

Yeah that's a bit harder I guess.

@deboer-tim
Copy link
Member Author

Feel free to fix it.

Done.

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.

5 participants