Thread (2 messages) 2 messages, 2 authors, 2025-01-31

Re: [PATCH v3 0/6][Outreachy] Introduce os-version Capability with Configurable Options

From: Christian Couder <hidden>
Date: 2025-01-31 14:30:25

On Mon, Jan 27, 2025 at 4:26 PM Junio C Hamano [off-list ref] wrote:
Christian Couder [off-list ref] writes:
quoted
information in the process. The fact that it's used to pass
information about available features has led to a lot of user agent
spoofing which means that analytics, statistics and debugging are
likely harder than they need to be.
Yes, that is a valid viewpoint, but ...
quoted
When Git developed capabilities and the "agent" capability, the doc
took care of saying things that it "MUST NOT be used to
programmatically assume the presence or absence of particular
features".
... the proposed os-version thing has the same wording in its
documentation, doesn't it?
Yeah, we repeat it to make sure that users read it. I am fine with
refactoring that wording if we think that having it once is enough.
What is being added is not to be used
in a way that requires parsing and trusting the result.
Why not? If server people want to do OS stats on their clients, for
example, why shouldn't they parse and trust the result?
So unless your point is that users (like those who parse User-Agent
string by browsers) will do the wrong thing and assume these strings
are usable for feature detection anyway so we should make it easier
to parse, I'd have to disagree.
We should make it easy to parse because people will use this field
(otherwise why are we adding it?), and we want to make it easy to use
rather than hard just because we are nice with our users.

I think we should not assume that they will do the wrong thing,
especially if our docs are clear about how it shouldn't be used.
 If we are not aiming to make it
easier to parse and assume certain things that we do not want them
to, I do not see why we need to have the pieces of information in
two separate capabilities.
I think it's just the right thing to make it easy to parse. Doing OS
stats on the server side doesn't need to be unnecessarily hard.

By the way, if we put the OS information in the "agent" capability,
how do we separate it from the existing "package/version" content and
make it easy to parse? I don't see a good solution because
GIT_USER_AGENT could be used, and the config option to not show the OS
name could be used too.

Also we don't know what could be in the "version" part. The doc says
that the agent part is typically of the form "package/version" but
doesn't require it.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help